Skip to content

The CoAP packet for canceling an observation (notifications) includes the Uri-Host and Uri-Path options twice #206

@derteufelqwe

Description

@derteufelqwe

Description
When I unsubscribe from notifications using await client.cancelObserveProactive(obs), the CoAP UDP packet, which is sent, includes the Uri-Host and Uri-Path options twice.

Steps to Reproduce

  1. Run the get_observe_async example
  2. Check the options of the packet, which is sent after calling await client.cancelObserveProactive(obs)

Expected Result
Every option is present once. Like this:

  • Uri-Host: californium.eclipseprojects.io
  • Uri-Path: obs
  • Observe: 1

Actual Result
Uri-Host and Uri-Path are duplicated. Like this:

  • Uri-Host: californium.eclipseprojects.io
  • Uri-Path: obs
  • Uri-Host: californium.eclipseprojects.io
  • Uri-Path: obs
  • Observe: 1

Debugging Observations
It looks like this is somehow caused by the interaction between CoapObserveClientRelation.cancellation() copying the full options of the request packet (which include the Uri-Host and Uri-Path) and CoapResponse.getAllOptions() adding the Uri-Host and Uri-Path aswell

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions