Skip to content

Commit fbad5dc

Browse files
committed
Updated https support
1 parent 1442004 commit fbad5dc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/net.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,8 @@ function initStream (self) {
303303
}
304304
if (secureBytesRead === null && !self.server) {
305305
// Client needs to write as part of handshake
306-
this._writeWatcher.start();
306+
self._writeWatcher.start();
307+
return;
307308
}
308309
} else {
309310
bytesRead = read(self.fd,
@@ -312,7 +313,6 @@ function initStream (self) {
312313
pool.length - pool.used);
313314
}
314315
} catch (e) {
315-
if (this.forceClose) this.forceClose(e);
316316
self.destroy(e);
317317
return;
318318
}
@@ -523,7 +523,7 @@ Stream.prototype._writeOut = function (data, encoding) {
523523
if (this.secure) return false;
524524
else throw new Error('Stream is not writable');
525525
}
526-
if (data.length == 0) return true;
526+
if (!this.secure && data.length == 0) return true;
527527

528528
var buffer, off, len;
529529
var bytesWritten, charsWritten;

0 commit comments

Comments
 (0)