Updated https support

This commit is contained in:
Rhys Jones 2010-04-15 06:17:22 +01:00
parent 144200435f
commit fbad5dc062

View File

@ -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;