mirror of https://github.com/nodejs/node.git
Throw from connection.connect if resolving.
Bug reported by James Golick.pull/5370/head
parent
23cf502db7
commit
ecd61742a1
|
@ -226,7 +226,7 @@ Handle<Value> Connection::Connect(const Arguments& args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// If connect() is called on an open connection, raise an error.
|
// 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(
|
Local<Value> exception = Exception::Error(
|
||||||
String::New("Socket is not in CLOSED state."));
|
String::New("Socket is not in CLOSED state."));
|
||||||
return ThrowException(exception);
|
return ThrowException(exception);
|
||||||
|
|
Loading…
Reference in New Issue