Max,


We created a jira issue at https://jira.iotivity.org/browse/IOT-1297. Please 
feel free to add more comments and add yourself as a watcher.



Best regards,



Ziran



From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:[email protected]] On Behalf Of Max Kholmyansky
Sent: 13 September 2016 12:08
To: iotivity-dev at lists.iotivity.org
Subject: [dev] Java API 1.1.1 - bug (server resource leak) in cancelObserve 
method



Hi,



I am using the Java API (client) of IoTivity 1.1.1 on Android.



I have a suspicion that cancelObserve method of OcResource class has a "leak": 
it does not release the observer on the server side.



My code is quite simple:

*       resource.observe(..., ..., ...) 
*       // Start getting notifications...
*       resource.cancelObserve()
*       // No notifications, but there is a leak...

The way I detect it - I discover a resource exposed by IoTivity Simulator.



After a call to cancelObserve() - the observer is staying in the "Resource 
Observers" tab in the Simulator server GUI.



Simulator client works cleaner: upon "Stop Observe" in the Simulator client - 
the observer is removed from the GUI, and there is a log message in the server: 
Observer removed [id:..., address: ... port: ...].



Is it a known bug? Any idea how it can be avoided?



Thanks and best regards,



Max.



Software Architect - Tekoia Ltd.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160913/a169abf8/attachment.html>

Reply via email to