Comparing version 0.1.7 to 0.1.8
@@ -892,3 +892,3 @@ var net = require('net'), | ||
var self = this; | ||
this._host = opts.host || '127.0.0.1'; | ||
this._host = opts.host || 'localhost'; | ||
this._port = opts.port || 22; | ||
@@ -895,0 +895,0 @@ this._compress = opts.compress || false; |
@@ -1141,4 +1141,7 @@ var EventEmitter = require('events').EventEmitter, | ||
if (err) { | ||
self.emit('error', err); | ||
self.readable = false; | ||
self._sftp.close(self.handle, function(err) { | ||
self.handle = undefined; | ||
self.emit('error', err); | ||
self.readable = false; | ||
}); | ||
return; | ||
@@ -1309,4 +1312,11 @@ } | ||
self.writable = false; | ||
cb && cb(err); | ||
self.emit('error', err); | ||
function emit() { | ||
self.handle = undefined; | ||
cb && cb(err); | ||
self.emit('error', err); | ||
} | ||
if (self.handle === undefined) | ||
emit(); | ||
else | ||
self._sftp.close(self.handle, emit); | ||
return; | ||
@@ -1407,3 +1417,3 @@ } | ||
if (this.handle === null) | ||
if (this.handle === undefined) | ||
this.once('open', close); | ||
@@ -1410,0 +1420,0 @@ else |
{ "name": "ssh2", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"author": "Brian White <mscdex@mscdex.net>", | ||
@@ -4,0 +4,0 @@ "description": "An SSH2 client module written in pure JavaScript for node.js", |
@@ -368,3 +368,3 @@ | ||
* **host** - < _string_ > - Hostname or IP address of the server. **Default:** ("127.0.0.1") | ||
* **host** - < _string_ > - Hostname or IP address of the server. **Default:** 'localhost' | ||
@@ -371,0 +371,0 @@ * **port** - < _integer_ > - Port number of the server. **Default:** 22 |
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
191477
4835