add disconnect reason
This commit is contained in:
parent
64ed2c125b
commit
d1dba0f4c0
1 changed files with 4 additions and 3 deletions
|
|
@ -206,8 +206,9 @@ class Client extends EventEmitter {
|
|||
/**
|
||||
* Emitted when the client has been disconnected
|
||||
* @event Client#disconnected
|
||||
* @param {WAState} reason state that caused the disconnect
|
||||
*/
|
||||
this.emit(Events.DISCONNECTED);
|
||||
this.emit(Events.DISCONNECTED, state);
|
||||
this.destroy();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue