net: fix socket and dns callbacks.

This commit is contained in:
Christopher Jeffrey 2017-01-24 18:34:01 -08:00
parent 32fd1d6dba
commit b8cd9893fb
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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;
}