Skip to content

Commit

Permalink
Fix checking if another client is trying to pair
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelthomas2774 committed Apr 11, 2020
1 parent c436563 commit a9dc408
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/HAPServer.ts
Expand Up @@ -425,7 +425,7 @@ export class HAPServer extends EventEmitter<Events> {
return;
}

if (this._pairing && this._pairing !== session && session._connection.connected) {
if (this._pairing && this._pairing !== session && this._pairing._connection.connected) {
response.writeHead(200, {"Content-Type": "application/pairing+tlv8"});
response.end(tlv.encode(TLVValues.STATE, States.M2, TLVValues.ERROR_CODE, Codes.BUSY));
return;
Expand Down

0 comments on commit a9dc408

Please sign in to comment.