use pump to pipe sockets

Ensures that destination socket close or destroy also does the same for
the source socket.
This commit is contained in:
Roman Shtylman
2018-05-16 10:21:56 -04:00
parent 743895720c
commit 317db73bdc
7 changed files with 97 additions and 50 deletions

View File

@@ -146,7 +146,7 @@ export default function(opt) {
const client = manager.getClient(clientId);
if (!client) {
sock.destroy();
socket.destroy();
return;
}