jvermillard / leshan

OMA Lightweight M2M java implementation - LWM2M
40 stars 25 forks source link

Ending an observation only rejects first incoming notification #30

Closed cburger-scheidlin closed 9 years ago

cburger-scheidlin commented 10 years ago

I have been playing with the observation feature. As I understand it, ending an observation causes leshan to send a RST message for an incoming notification. However, this is only done for the first incoming notification that is received after the observation is cancelled.

As far as I read the CoAP RFC, this is definitely conforming to the standard, since if leshan receives a NON message that it cannot process, it is not required to send a RST message.

However, this could lead to problems when a lwm2m device sends NON notifications for a long period of time and the RST message is lost. Then we get a situation where the device does not know that the server is no longer interested in the communication.

Therefore I would suggest sending out a RST message for unknown NON messages as well.

sbernard31 commented 10 years ago

I just have a look at californium source code(the COAP implementation we are using) and I guess they try to do what you suggest.

But this is not really clear to me, the sendEmptyMessage seems to not send any RST message ...

sbernard31 commented 10 years ago

I open an issue on californium project

sbernard31 commented 9 years ago

It seems that californium move from github to bugzilla to handle its issues. So, the issue I opened was lost during the migration ..

mkovatsc commented 9 years ago

Just found this here. Yes, the removal of the GitHub Issues section came quite as a suprise to use (officially it should never have been enabled, but Eclipse is working on a policy change AFAIK). I will look into the RSTs.

sbernard31 commented 9 years ago

It should be fixed now we use the 1.0.0-M3 version of Californium which fixes this problem. (Thx Matthias)