From: Ryan Dahl Date: Tue, 16 Feb 2010 22:38:51 +0000 (-0800) Subject: Throw from connection.connect if resolving. X-Git-Tag: v0.1.29~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ecd61742a128a515d9c123add368fbc6942b0e7c;p=platform%2Fupstream%2Fnodejs.git Throw from connection.connect if resolving. Bug reported by James Golick. --- diff --git a/src/node_net.cc b/src/node_net.cc index d5f5ff6..aaa4ddf 100644 --- a/src/node_net.cc +++ b/src/node_net.cc @@ -226,7 +226,7 @@ Handle Connection::Connect(const Arguments& args) { } // If connect() is called on an open connection, raise an error. - if (connection->ReadyState() != EVCOM_INITIALIZED) { + if (connection->ReadyState() != EVCOM_INITIALIZED || connection->resolving_) { Local exception = Exception::Error( String::New("Socket is not in CLOSED state.")); return ThrowException(exception);