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

Commit

Permalink
OicClient: Remove handle when PRESENCE_TRIGGER_DELETE event is received
Browse files Browse the repository at this point in the history
Signed-off-by: Sudarsana Nagineni <sudarsana.nagineni@intel.com>
  • Loading branch information
Sudarsana Nagineni committed Jan 7, 2016
1 parent de9b27e commit b5f7f82
Showing 1 changed file with 7 additions and 0 deletions.
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

0 comments on commit b5f7f82

Please sign in to comment.