From b8cd9893fbbad1694427d71faba6068cc5dcb24e Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 24 Jan 2017 18:34:01 -0800 Subject: [PATCH] net: fix socket and dns callbacks. --- lib/net/pool.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/net/pool.js b/lib/net/pool.js index a85d2a7e..410593cf 100644 --- a/lib/net/pool.js +++ b/lib/net/pool.js @@ -3228,9 +3228,9 @@ function PoolOptions(options) { this.port = this.network.port; this.maxOutbound = 8; this.maxInbound = 8; - this.createSocket = this._createSocket; + this.createSocket = this._createSocket.bind(this); this.createServer = tcp.createServer; - this.resolve = this._resolve; + this.resolve = this._resolve.bind(this); this.proxy = null; this.onion = false; this.selfish = false; @@ -3374,7 +3374,7 @@ PoolOptions.prototype.fromOptions = function fromOptions(options) { this.proxy = options.proxy; } - if (options.onion) { + if (options.onion != null) { assert(typeof options.onion === 'boolean'); this.onion = options.onion; }