Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Fixes #1304. The Connection instance may be destroyed by abort() when…
Browse files Browse the repository at this point in the history
… process.nextTick is executed.
  • Loading branch information
SaltwaterC authored and koichik committed Jul 14, 2011
1 parent 7097eca commit 901ebed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/tls.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,10 @@ function SecurePair(credentials, isServer, requestCert, rejectUnauthorized) {
this.encrypted = new EncryptedStream(this);

process.nextTick(function() {
self.ssl.start();
/* The Connection may be destroyed by an abort call */
if (self.ssl) {
self.ssl.start();
}
self.cycle();
});
}
Expand Down

0 comments on commit 901ebed

Please sign in to comment.