projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b57d946
)
Add hack to get error event on socket timeout
author
Ryan Dahl
<ry@tinyclouds.org>
Tue, 23 Feb 2010 06:12:21 +0000
(22:12 -0800)
committer
Ryan Dahl
<ry@tinyclouds.org>
Tue, 23 Feb 2010 21:05:15 +0000
(13:05 -0800)
See
http://groups.google.com/group/nodejs/browse_thread/thread/
4898a1ed3b99dcf0
deps/evcom/evcom.c
patch
|
blob
|
history
diff --git
a/deps/evcom/evcom.c
b/deps/evcom/evcom.c
index
0f48ab0
..
1ee02a1
100644
(file)
--- a/
deps/evcom/evcom.c
+++ b/
deps/evcom/evcom.c
@@
-1018,6
+1018,11
@@
on_timeout (EV_P_ ev_timer *watcher, int revents)
if (stream->on_timeout) stream->on_timeout(stream);
+ // Hack to get error in Node on 'close' event.
+ // should probably be made into a proper error code.
+ stream->errorno = 1;
+
+ ev_timer_stop(EV_A_ watcher);
evcom_stream_force_close(stream);
if (stream->on_close) stream->on_close(stream);