Skip to content

Commit

Permalink
Merge pull request #1 from Babibubebon/fix_disconnect
Browse files Browse the repository at this point in the history
Fix peripheral.services not cleared when disconnect
  • Loading branch information
Babibubebon authored Feb 20, 2017
2 parents 18c51f0 + 14ea17e commit 99b94b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/peripheral.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Peripheral.prototype.connect = function(callback) {
Peripheral.prototype.disconnect = function(callback) {
if (callback) {
this.once('disconnect', function() {
this.services = null;
callback(null);
});
}
Expand Down

0 comments on commit 99b94b8

Please sign in to comment.