telnet-client
Advanced tools
Comparing version 0.16.3 to 0.16.4
@@ -76,6 +76,9 @@ 'use strict' | ||
/* if cannot connect, emit error and destroy */ | ||
this.emit('error', 'Cannot connect') | ||
if (this.listeners('error').length > 0) | ||
this.emit('error', 'Cannot connect') | ||
this.socket.destroy() | ||
return reject(new Error('Cannot connect')) | ||
} | ||
else this.emit('timeout') | ||
this.emit('timeout') | ||
return reject(new Error('timeout')) | ||
}) | ||
@@ -95,3 +98,4 @@ | ||
this.socket.on('error', error => { | ||
this.emit('error', error) | ||
if (this.listeners('error').length > 0) | ||
this.emit('error', error) | ||
}) | ||
@@ -98,0 +102,0 @@ |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "0.16.3", | ||
"version": "0.16.4", | ||
"main": "./lib/index.js", | ||
@@ -11,0 +11,0 @@ "engine": "node >= 6.9.1", |
@@ -1,2 +0,2 @@ | ||
var telnet = process.env.NODETELNETCLIENT_COV | ||
var telnet = process.env.NODETELNETCLIENT_COV | ||
? require('../lib-cov/index') | ||
@@ -27,3 +27,3 @@ : require('../lib/index') | ||
}) | ||
srv.listen(2323, function() { | ||
@@ -30,0 +30,0 @@ callback() |
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
46556
271649
1019