Merge pull request #610 from Gjum/patch/socket-end

Distinguish socket ending from other end reasons
This commit is contained in:
Romain Beaumont 2018-12-22 10:06:26 +01:00 committed by GitHub
commit d171e47554
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,7 +132,7 @@ class Client extends EventEmitter {
this.socket.removeListener('close', endSocket)
this.socket.removeListener('end', endSocket)
this.socket.removeListener('timeout', endSocket)
this.emit('end', this._endReason)
this.emit('end', this._endReason || 'SocketClosed')
}
const onFatalError = (err) => {