diff --git a/src/connection.js b/src/connection.js index b4d0f6f1..e8e4881d 100644 --- a/src/connection.js +++ b/src/connection.js @@ -129,7 +129,7 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose try { x = options.socket ? (await Promise.resolve(options.socket(options))) - : net.Socket() + : new net.Socket() } catch (e) { error(e) return