From bae545dab78d4b3c5425f119a8b5d7c6f2e9bd2b Mon Sep 17 00:00:00 2001 From: Alexis Campailla Date: Tue, 4 Feb 2014 09:16:44 -0800 Subject: [PATCH] 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 9836a4eeda1e2d43aad0923f1f72b364792629bc --- test/simple/test-tcp-wrap-listen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/simple/test-tcp-wrap-listen.js b/test/simple/test-tcp-wrap-listen.js index 940ea8b4b8..fb3175a008 100644 --- a/test/simple/test-tcp-wrap-listen.js +++ b/test/simple/test-tcp-wrap-listen.js @@ -64,7 +64,7 @@ server.onconnection = function(err, client) { // 11 bytes should flush assert.equal(0, client.writeQueueSize); - if (req.async && client.writeQueueSize != 0) + if (req.async) req.oncomplete = done; else process.nextTick(done.bind(null, 0, client, req));