basic-ftp
Advanced tools
Comparing version 4.3.1 to 4.3.2
# Changelog | ||
## 4.3.2 | ||
- Fixed regression at 4.3.0: File descriptor closed too early. (#103) | ||
## 4.3.1 | ||
@@ -4,0 +8,0 @@ |
@@ -437,2 +437,3 @@ "use strict"; | ||
destination.removeListener("error", onError); | ||
destination.end(); | ||
} | ||
@@ -439,0 +440,0 @@ } |
@@ -227,3 +227,3 @@ "use strict"; | ||
const dataSocket = ftp.dataSocket; | ||
if (!dataSocket) { | ||
if (!dataSocket || !dataSocket.remoteAddress) { | ||
resolver.onError(task, new Error("Upload should begin but no data connection is available.")); | ||
@@ -271,3 +271,3 @@ return; | ||
const dataSocket = ftp.dataSocket; | ||
if (!dataSocket) { | ||
if (!dataSocket || !dataSocket.remoteAddress) { | ||
resolver.onError(task, new Error("Download should begin but no data connection is available.")); | ||
@@ -282,3 +282,3 @@ return; | ||
// Check if the data socket is not already closed. | ||
onConditionOrEvent(dataSocket.destroyed, dataSocket, "end", () => resolver.onDataDone(task)); | ||
onConditionOrEvent(destination.destroyed, destination, "finish", () => resolver.onDataDone(task)); | ||
} | ||
@@ -285,0 +285,0 @@ else if (res.code === 350) { // Restarting at startAt. |
{ | ||
"name": "basic-ftp", | ||
"version": "4.3.1", | ||
"version": "4.3.2", | ||
"description": "FTP client for Node.js, supports explicit FTPS over TLS, IPv6, Async/Await, and Typescript.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index", |
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
138310
2816