Skip to content

Commit 91c3771

Browse files
authored
Merge pull request #65 from mymyoux/master
fix uncaught error from ssh2/lib/client#connect method
2 parents 7586304 + 76379ea commit 91c3771

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,13 @@ function createServer(config) {
6262
});
6363

6464
connections.push(sshConnection, netConnection);
65-
sshConnection.connect(config);
65+
try
66+
{
67+
sshConnection.connect(config);
68+
}catch(error)
69+
{
70+
server.emit('error', error);
71+
}
6672
});
6773

6874
server.on('close', function () {

0 commit comments

Comments
 (0)