Comparing version 0.6.1 to 0.6.2
@@ -159,2 +159,7 @@ var WebSocket = require("ws"); | ||
case 1006: | ||
//WEB: if (this.failed) { | ||
//WEB: message = "Connection refused"; | ||
//WEB: code = "ECONNREFUSED"; | ||
//WEB: break; | ||
//WEB: } | ||
message = "Connection aborted"; | ||
@@ -272,2 +277,4 @@ code = "ECONNABORTED"; | ||
this.onmessage = null; | ||
if (!reason) | ||
reason = 1000; | ||
try { | ||
@@ -274,0 +281,0 @@ this.ws.close(reason, description); |
@@ -241,2 +241,4 @@ var Path = (function () { | ||
var error = null; | ||
var sourceError = null; | ||
var targetError = null; | ||
var total = 0; | ||
@@ -256,2 +258,4 @@ var item = null; | ||
eof = true; | ||
if (targetError) | ||
return exit(); | ||
if (empty && target.acceptsEmptyBlocks) | ||
@@ -263,3 +267,5 @@ target.write(new Buffer(0)); | ||
//console.log("read error", err); | ||
error = error || err || new Error("Unspecified error"); | ||
sourceError = sourceError || err || new Error("Unspecified error"); | ||
if (!error) | ||
error = sourceError; | ||
eof = true; | ||
@@ -284,3 +290,5 @@ target.end(); | ||
//console.log("write error", err); | ||
error = error || err || new Error("Unspecified error"); | ||
targetError = targetError || err || new Error("Unspecified error"); | ||
if (!error) | ||
error = targetError; | ||
exit(); | ||
@@ -287,0 +295,0 @@ }); |
@@ -214,2 +214,3 @@ var __extends = (this && this.__extends) || function (d, b) { | ||
this.queue = []; | ||
this.readable = false; | ||
this._flush(); | ||
@@ -216,0 +217,0 @@ }; |
@@ -550,2 +550,3 @@ var __extends = (this && this.__extends) || function (d, b) { | ||
sftp.end(); | ||
this.emit("close", null); | ||
}; | ||
@@ -552,0 +553,0 @@ return SftpClient; |
@@ -180,3 +180,3 @@ var __extends = (this && this.__extends) || function (d, b) { | ||
} | ||
else if (err.code === "ECONNABORTED") { | ||
else if (err.code === "ECONNABORTED" || err.code === "X_GOINGAWAY") { | ||
log.info("[%d] - Session aborted by the client", _this._id); | ||
@@ -183,0 +183,0 @@ err = null; |
{ | ||
"name": "sftp-ws", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "SFTP over WebSockets - client and server library", | ||
@@ -5,0 +5,0 @@ "main": "./lib/sftp.js", |
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
197236
5069