mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Throw from connection.connect if resolving.
Bug reported by James Golick.
This commit is contained in:
1 parent
23cf502db7
commit
ecd61742a1
1 file changed
+1
-1
+1
-1
@@ -226,7 +226,7 @@ Handle<Value> 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<Value> exception = Exception::Error(
|
||||
String::New("Socket is not in CLOSED state."));
|
||||
return ThrowException(exception);
|
||||
|
||||
Reference in new issue
Block a user