Fix disconnect of WebSocket

This commit is contained in:
Bryan Ashby 2017-06-06 20:04:28 -06:00
parent ff5896e80c
commit 64aa63e8b5
1 changed files with 3 additions and 2 deletions

View File

@ -41,7 +41,7 @@ function WebSocketClient(ws, req, serverType) {
}
end() {
return ws.terminate();
return ws.terminate();
}
write(data, cb) {
@ -59,7 +59,8 @@ function WebSocketClient(ws, req, serverType) {
});
ws.on('close', () => {
this.end();
// we'll remove client connection which will in turn end() via our SocketBridge above
return this.emit('end');
});
//