http server emits 'clientError'
authorRyan Dahl <ry@tinyclouds.org>
Fri, 30 Apr 2010 17:28:18 +0000 (10:28 -0700)
committerRyan Dahl <ry@tinyclouds.org>
Fri, 30 Apr 2010 17:29:35 +0000 (10:29 -0700)
doc/api.markdown
lib/http.js

index 6a99a17..5bafa8a 100644 (file)
@@ -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)
 
index 884fd9a..b7adee5 100644 (file)
@@ -552,7 +552,7 @@ function connectionListener (socket) {
   }
 
   socket.addListener('error', function (e) {
-    sys.puts('node http server: ' + e);
+    self.emit('clientError', e);
   });
 
   socket.ondata = function (d, start, end) {