Browse Source

pipe_wrap: don't assert() on pipe accept errors

Pass errors to the onconnection callback.
v0.8.7-release
Ben Noordhuis 13 years ago
parent
commit
3883f22ad1
  1. 4
      src/pipe_wrap.cc

4
src/pipe_wrap.cc

@ -191,8 +191,8 @@ void PipeWrap::OnConnection(uv_stream_t* handle, int status) {
assert(wrap->object_.IsEmpty() == false);
if (status != 0) {
// TODO Handle server error (set errno and call onconnection with NULL)
assert(0);
SetErrno(uv_last_error(uv_default_loop()));
MakeCallback(wrap->object_, "onconnection", 0, NULL);
return;
}

Loading…
Cancel
Save