From f657a6324a08145263355c85dd37253c63c4c1b5 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 11 Jun 2009 11:42:43 +0200 Subject: [PATCH] Fix comment/test for Mac getaddinfo() bug. Note: the test case was broken because on Macintosh the client connects synchronously. This is undesirable but ok for now. --- src/net.cc | 5 ++++- test/test-tcp-pingpong.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/net.cc b/src/net.cc index ff3a9dc549..0e88abf741 100644 --- a/src/net.cc +++ b/src/net.cc @@ -184,7 +184,10 @@ Connection::Connect (const Arguments& args) } #ifdef __APPLE__ - /* Bypass the thread pool and do it sync on this broken ass platform */ + /* HACK: Bypass the thread pool and do it sync on Macintosh. + * Experiecing strange error where execution halts on + * getaddrinfo() and CPU goes to 100%. FIXME. + */ eio_req *req = static_cast(malloc(sizeof(eio_req))); req->data = connection; Connection::Resolve(req); diff --git a/test/test-tcp-pingpong.js b/test/test-tcp-pingpong.js index 6e62dca4da..85e01a83ff 100644 --- a/test/test-tcp-pingpong.js +++ b/test/test-tcp-pingpong.js @@ -68,8 +68,8 @@ function onLoad() { client.onEOF = function () { }; - client.connect(port); assertEquals("closed", client.readyState); + client.connect(port); } function onExit () {