diff --git a/.gitignore b/.gitignore index 892d067..2e1d5d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules temp dist -.vscode \ No newline at end of file +.vscode +.idea \ No newline at end of file diff --git a/package.json b/package.json index 92474bb..015328a 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ ], "scripts": { "prepublishOnly": "npm run clean && npm run lint && tsc && mocha", + "prepare": "tsc", "test": "npm run prepublishOnly", "clean": "rm -rf dist", "lint": "eslint \"./src/**/*.ts\"", diff --git a/src/FtpContext.ts b/src/FtpContext.ts index 70f0e79..0b073a2 100644 --- a/src/FtpContext.ts +++ b/src/FtpContext.ts @@ -392,9 +392,7 @@ export class FTPContext { if (socket) { this._removeSocketListeners(socket) socket.on("error", doNothing) - socket.on("timeout", () => socket.destroy()) - socket.setTimeout(this.timeout) - socket.end() + socket.destroy() } }