Browse Source

SendTo and SendMsg expect a buffer only, not a string; fix the error message. Closes #1239.

v0.7.4-release
Joe Shaw 14 years ago
committed by Paul Querna
parent
commit
3dbb3cdb6a
  1. 4
      src/node_net.cc

4
src/node_net.cc

@ -1041,7 +1041,7 @@ static Handle<Value> SendMsg(const Arguments& args) {
// Grab the actul data to be written, stuffing it into iov
if (!Buffer::HasInstance(args[1])) {
return ThrowException(Exception::TypeError(
String::New("Expected either a string or a buffer")));
String::New("Expected a buffer")));
}
Local<Object> buffer_obj = args[1]->ToObject();
@ -1167,7 +1167,7 @@ static Handle<Value> SendTo(const Arguments& args) {
// Grab the actul data to be written
if (!Buffer::HasInstance(args[1])) {
return ThrowException(Exception::TypeError(
String::New("Expected either a string or a buffer")));
String::New("Expected a buffer")));
}
Local<Object> buffer_obj = args[1]->ToObject();

Loading…
Cancel
Save