Fix WebSocket disconnect

This commit is contained in:
Bryan Ashby 2017-08-14 21:22:03 -06:00
parent d5954f8198
commit b7ca78ebc4
1 changed files with 3 additions and 1 deletions

View File

@ -41,10 +41,12 @@ function WebSocketClient(ws, req, serverType) {
}
end() {
return ws.terminate();
return ws.close();
}
write(data, cb) {
cb = cb || ( () => { /* eat it up */} ); // handle data writes after close
return this.ws.send(data, { binary : true }, cb);
}