Browse Source

http server emits 'clientError'

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
3b323027be
  1. 7
      doc/api.markdown
  2. 2
      lib/http.js

7
doc/api.markdown

@ -1594,6 +1594,13 @@ options argument for `net.Server`.
The `request_listener` is a function which is automatically The `request_listener` is a function which is automatically
added to the `'request'` event. 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) ### server.listen(port, hostname)

2
lib/http.js

@ -552,7 +552,7 @@ function connectionListener (socket) {
} }
socket.addListener('error', function (e) { socket.addListener('error', function (e) {
sys.puts('node http server: ' + e); self.emit('clientError', e);
}); });
socket.ondata = function (d, start, end) { socket.ondata = function (d, start, end) {

Loading…
Cancel
Save