Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

OicClient: Remove handle when PRESENCE_TRIGGER_DELETE event is received #35

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/OicClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,13 @@ _.extend( devicePrototype, {
delete this._resources[ index ];
}
}
if ( this._handles[ deviceId ] ) {
if ( !this._handles[ deviceId ].stale ) {
iotivity.OCCancel( this._handles[ deviceId ],
iotivity.OCQualityOfService.OC_HIGH_QOS, null, 0 );
}
delete this._handles[ deviceId ];
}
break;

default:
Expand Down