Skip to content

Commit

Permalink
当错误码是-6时,需要调用disconnect来停止协议栈
Browse files Browse the repository at this point in the history
  • Loading branch information
heavyrain2012 committed Mar 10, 2021
1 parent 32d7582 commit 43a4e32
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/wfc/proto/proto.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ class WfcImpl {
self.connectionStatus = status;
self.eventEmitter.emit(EventType.ConnectionStatusChanged, status);
console.log('connection status changed', status);
if (self.isLogined && (status == ConnectionStatus.ConnectionStatusSecretKeyMismatch || status === ConnectionStatus.ConnectionStatusRejected)) {
self.disconnect();
}
}

// /**
Expand Down

0 comments on commit 43a4e32

Please sign in to comment.