Skip to content
Merged
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
5 changes: 1 addition & 4 deletions lib/hci-socket/hci.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ class Hci extends EventEmitter {
}

resetBuffers () {
this._mainHandle = null;
this._handleAclsInProgress = {};
this._handleBuffers = {};
this._aclOutQueue = [];
Expand Down Expand Up @@ -527,7 +526,7 @@ class Hci extends EventEmitter {
if (subEventType === EVT_DISCONN_COMPLETE) {
handle = data.readUInt16LE(4);
debug('\t\thandle = ' + handle);
if (handle !== this._mainHandle) {
if (this._handleAclsInProgress[handle] === undefined) {
debug('\tignoring event because handle is unknown to bleno.');
debug('This might be OK in a multi role scenario in which the handle is part of a noble connection.');
return;
Expand All @@ -543,7 +542,6 @@ class Hci extends EventEmitter {
Controller for the returned Handle have been flushed, and that the
corresponding data buffers have been freed. */
delete this._handleAclsInProgress[handle];
this._mainHandle = null;
const aclOutQueue = [];
let discarded = 0;
for (const i in this._aclOutQueue) {
Expand Down Expand Up @@ -789,7 +787,6 @@ class Hci extends EventEmitter {
debug('\t\t\tsupervision timeout = ' + supervisionTimeout);
debug('\t\t\tmaster clock accuracy = ' + masterClockAccuracy);

this._mainHandle = handle;
this._handleAclsInProgress[handle] = 0;

this.emit('leConnComplete', status, handle, role, addressType, address, interval, latency, supervisionTimeout, masterClockAccuracy);
Expand Down
Loading