From fbad5dc06216ab6cdfd91a03f893b6671289a2a4 Mon Sep 17 00:00:00 2001 From: Rhys Jones Date: Thu, 15 Apr 2010 06:17:22 +0100 Subject: [PATCH] Updated https support --- lib/net.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/net.js b/lib/net.js index 2ec7f2b..6e0534c 100644 --- a/lib/net.js +++ b/lib/net.js @@ -303,7 +303,8 @@ function initStream (self) { } if (secureBytesRead === null && !self.server) { // Client needs to write as part of handshake - this._writeWatcher.start(); + self._writeWatcher.start(); + return; } } else { bytesRead = read(self.fd, @@ -312,7 +313,6 @@ function initStream (self) { pool.length - pool.used); } } catch (e) { - if (this.forceClose) this.forceClose(e); self.destroy(e); return; } @@ -523,7 +523,7 @@ Stream.prototype._writeOut = function (data, encoding) { if (this.secure) return false; else throw new Error('Stream is not writable'); } - if (data.length == 0) return true; + if (!this.secure && data.length == 0) return true; var buffer, off, len; var bytesWritten, charsWritten; -- 2.7.4