tunnel-ssh
Advanced tools
Comparing version 5.0.5 to 5.0.6
12
index.js
@@ -53,2 +53,5 @@ const net = require('net'); | ||
} catch (e) { | ||
if (server) { | ||
server.close() | ||
} | ||
return reject(e); | ||
@@ -67,3 +70,10 @@ } | ||
forwardOptions.dstPort, (err, stream) => { | ||
connection.pipe(stream).pipe(connection); | ||
if (err) { | ||
if (server) { | ||
server.close() | ||
} | ||
throw err; | ||
} else { | ||
connection.pipe(stream).pipe(connection); | ||
} | ||
}); | ||
@@ -70,0 +80,0 @@ |
{ | ||
"name": "tunnel-ssh", | ||
"version": "5.0.5", | ||
"version": "5.0.6", | ||
"description": "Easy extendable SSH tunnel", | ||
@@ -29,4 +29,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"ssh2": "^1.11.0" | ||
"ssh2": "^1.13.0" | ||
} | ||
} |
@@ -204,3 +204,3 @@ Tunnel-SSH | ||
return createTunnel(tunnelOptions, serverOptions, sshOptions, autoClose); | ||
return createTunnel(tunnelOptions, serverOptions, sshOptions, forwardOptions); | ||
} | ||
@@ -207,0 +207,0 @@ |
9079
73
Updatedssh2@^1.13.0