From 4472686876baf1ca1b3324a5d5c4504b9efed94b Mon Sep 17 00:00:00 2001 From: calebboyd Date: Mon, 5 Apr 2021 13:27:03 -0500 Subject: [PATCH] chore: pr review - hold socket listener until dequeued --- index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/index.js b/index.js index ceffec1..4c65929 100644 --- a/index.js +++ b/index.js @@ -94,8 +94,6 @@ function attachFinishedListener (msg, callback) { function onFinish (error) { eeMsg.cancel() - eeSocket.cancel() - finished = true callback(error) } @@ -121,7 +119,7 @@ function attachFinishedListener (msg, callback) { if (msg.socket) { // socket already assigned - defer(onSocket, msg.socket) + onSocket(msg.socket) return }