|
@ -59,6 +59,8 @@ IOWatcher.prototype.ondrain = function () { |
|
|
if (this.socket) { |
|
|
if (this.socket) { |
|
|
var socket = this.socket; |
|
|
var socket = this.socket; |
|
|
|
|
|
|
|
|
|
|
|
socket._haveTriedFlush = false; |
|
|
|
|
|
|
|
|
if (socket.writable || socket.readable) { |
|
|
if (socket.writable || socket.readable) { |
|
|
require('timers').active(socket); |
|
|
require('timers').active(socket); |
|
|
} |
|
|
} |
|
@ -327,8 +329,9 @@ Stream.prototype.write = function (data /* encoding, fd, callback */) { |
|
|
this._onWritable(); // Insert writeWatcher into the dumpQueue
|
|
|
this._onWritable(); // Insert writeWatcher into the dumpQueue
|
|
|
require('timers').active(this); |
|
|
require('timers').active(this); |
|
|
|
|
|
|
|
|
if (queueSize > (64*1024)) { |
|
|
if (queueSize > (64*1024) && !this._haveTriedFlush) { |
|
|
IOWatcher.flush(); |
|
|
IOWatcher.flush(); |
|
|
|
|
|
this._haveTriedFlush = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return queueSize < (64*1024); |
|
|
return queueSize < (64*1024); |
|
|