Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Revert "net: Avoid tickDepth warnings on small writes"
Browse files Browse the repository at this point in the history
This commit breaks simple/test-stream2-stderr-sync.  Need to figure out
a better way, or just accept that `(function W(){stream.write(b,W)})()`
is going to be noisy.  People should really be using the `'drain'` event
for this use-case anyway.

This reverts commit 02f7d1b.
  • Loading branch information
isaacs committed Jan 29, 2013
1 parent 02f7d1b commit bda45a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 85 deletions.
8 changes: 7 additions & 1 deletion lib/net.js
Expand Up @@ -601,8 +601,14 @@ Socket.prototype._write = function(dataEncoding, cb) {
return this._destroy(errnoException(errno, 'write'), cb);

writeReq.oncomplete = afterWrite;
writeReq.cb = cb;
this._bytesDispatched += writeReq.bytes;

// If it was entirely flushed, we can write some more right now.
// However, if more is left in the queue, then wait until that clears.
if (this._handle.writeQueueSize === 0)
cb();
else
writeReq.cb = cb;
};

function createWriteReq(handle, data, encoding) {
Expand Down
84 changes: 0 additions & 84 deletions test/simple/test-net-many-small-writes.js

This file was deleted.

0 comments on commit bda45a8

Please sign in to comment.