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:
557ba6b
)
http server emits 'clientError'
author
Ryan Dahl
<ry@tinyclouds.org>
Fri, 30 Apr 2010 17:28:18 +0000
(10:28 -0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Fri, 30 Apr 2010 17:29:35 +0000
(10:29 -0700)
doc/api.markdown
patch
|
blob
|
history
lib/http.js
patch
|
blob
|
history
diff --git
a/doc/api.markdown
b/doc/api.markdown
index
6a99a17
..
5bafa8a
100644
(file)
--- a/
doc/api.markdown
+++ b/
doc/api.markdown
@@
-1594,6
+1594,13
@@
options argument for `net.Server`.
The `request_listener` is a function which is automatically
added to the `'request'` event.
+
+### Event: 'clientError'
+
+`function (exception) {}`
+
+If a client connection emits an 'error' event - it will forwarded here.
+
### server.listen(port, hostname)
diff --git
a/lib/http.js
b/lib/http.js
index
884fd9a
..
b7adee5
100644
(file)
--- a/
lib/http.js
+++ b/
lib/http.js
@@
-552,7
+552,7
@@
function connectionListener (socket) {
}
socket.addListener('error', function (e) {
- s
ys.puts('node http server: ' +
e);
+ s
elf.emit('clientError',
e);
});
socket.ondata = function (d, start, end) {