Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2012-05-10 01:11:14 +0400
committerBen Noordhuis <info@bnoordhuis.nl>2012-05-10 01:30:48 +0400
commit3883f22ad18998e24246358e0d87e68bd9d2b2b0 (patch)
tree1d65f047d1450bc82f56b567c8189f20e052e0d7 /src/pipe_wrap.cc
parentbf9d8e9214e2098bacf18416564dc3a91bcdf5d6 (diff)
pipe_wrap: don't assert() on pipe accept errors
Pass errors to the onconnection callback.
Diffstat (limited to 'src/pipe_wrap.cc')
-rw-r--r--src/pipe_wrap.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc
index c99fe473976..b062b40f4f6 100644
--- a/src/pipe_wrap.cc
+++ b/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;
}