axon-secure
Advanced tools
Comparing version 2.0.6 to 2.0.7
@@ -180,5 +180,9 @@ | ||
debug('%s closing', this.type); | ||
this.server.on('close', this.emit.bind(this, 'close')); | ||
this.server.close(); | ||
fn && fn(); | ||
if (this.server) { | ||
this.server.on('close', this.emit.bind(this, 'close')); | ||
this.server.close(fn); | ||
} else { | ||
this.emit.bind(this, 'close'); | ||
fn && fn(); | ||
} | ||
}; | ||
@@ -371,6 +375,5 @@ | ||
setImmediate(function () { | ||
debug('%s connect attempt %s:%s', self.type, host, port); | ||
sock.connect(port, host); | ||
}); | ||
debug('%s connect attempt %s:%s', self.type, host, port); | ||
sock.connect(port, host); | ||
return this; | ||
@@ -411,2 +414,3 @@ }; | ||
this.type = 'server'; | ||
this.closing = false; | ||
this.server = net.createServer(onconnection.bind(this)); | ||
@@ -413,0 +417,0 @@ |
{ | ||
"name": "axon-secure", | ||
"description": "High-level messaging & socket patterns with optional encryption implemented in pure js", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"author": "Marcello Gesmundo <mgesmundo@yoovant.com>", | ||
@@ -6,0 +6,0 @@ "dependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39061
1091