Browse Source

test: fix test-tcp-wrap-listen

If the call to writeBuffer completes asynchronously, we need to have
an oncomplete callback on the request object no matter what. The
writeQueueSize seems irrelvant to that regard.

Note that on Windows writeBuffer always completes asynchronously.

See related commit 9836a4eeda
v0.11.12-release
Alexis Campailla 11 years ago
committed by Fedor Indutny
parent
commit
bae545dab7
  1. 2
      test/simple/test-tcp-wrap-listen.js

2
test/simple/test-tcp-wrap-listen.js

@ -64,7 +64,7 @@ server.onconnection = function(err, client) {
// 11 bytes should flush // 11 bytes should flush
assert.equal(0, client.writeQueueSize); assert.equal(0, client.writeQueueSize);
if (req.async && client.writeQueueSize != 0) if (req.async)
req.oncomplete = done; req.oncomplete = done;
else else
process.nextTick(done.bind(null, 0, client, req)); process.nextTick(done.bind(null, 0, client, req));

Loading…
Cancel
Save