Tim Hi Thanks a lot for your suggestion. Indeed, High QoS solves the issue.
Still from my perspective it looks like a bug: choice of QoS should not cause "leaks" on the server side. Best regards, On Wed, Sep 14, 2016 at 1:55 AM, Kourt, Tim A <tim.a.kourt at intel.com> wrote: > Hi Max, > > > > Try setting platform?s quality of service to high: > > > > PlatformConfig platformConfig = new PlatformConfig( > > . > > . > > *QualityOfService.High* > > ); > > > > I believe, this issue (or feature) boils down all the way to CSDK where > cancel request is not sent with low QoS. > > > > Best regards, > > > > Tim Kourt > > Intel Open Source Technology Center > > > > > > > > *From:* iotivity-dev-bounces at lists.iotivity.org [mailto: > iotivity-dev-bounces at lists.iotivity.org] *On Behalf Of *Max Kholmyansky > *Sent:* Tuesday, September 13, 2016 4:08 AM > *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/20160915/3cd6603c/attachment.html>
