Accept ports represented as strings

v0.7.4-release
Ryan 2009-06-17 10:16:48 +02:00
parent d77f757745
commit b3b6f8c02e
1 changed files with 2 additions and 2 deletions

View File

@ -196,7 +196,7 @@ Connection::Connect (const Arguments& args)
connection->Init(); // in case we're reusing the socket... ?
}
if (args.Length() == 0 || args[0]->IsInt32() == false)
if (args.Length() == 0)
return ThrowException(String::New("Must specify a port."));
String::AsciiValue port_sv(args[0]->ToString());
@ -692,7 +692,7 @@ Acceptor::Listen (const Arguments& args)
Acceptor *acceptor = NODE_UNWRAP(Acceptor, args.Holder());
if (!acceptor) return Handle<Value>();
if (args.Length() < 1)
if (args.Length() == 0)
return ThrowException(String::New("Must give at least a port as argument."));
HandleScope scope;