Fixes #1304. The Connection instance may be destroyed by abort() when process.nextTick is executed.

pull/5370/head
Stefan Rusu 2011-07-14 12:52:43 +03:00 committed by koichik
parent 7097eca5a7
commit 901ebed8ff
1 changed files with 4 additions and 1 deletions

View File

@ -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();
});
}