[Groonga-commit] droonga/express-droonga at 7a3b622 [master] Close connection on server error

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Apr 22 15:44:17 JST 2014


Kouhei Sutou	2014-04-22 15:44:17 +0900 (Tue, 22 Apr 2014)

  New Revision: 7a3b622304953c9f2301764a7da4d09176453d73
  https://github.com/droonga/express-droonga/commit/7a3b622304953c9f2301764a7da4d09176453d73

  Message:
    Close connection on server error
    
    Such as EADDRINUSE.

  Modified files:
    index.js

  Modified: index.js (+3 -0)
===================================================================
--- index.js    2014-04-22 15:15:54 +0900 (220b5c5)
+++ index.js    2014-04-22 15:44:17 +0900 (9ff94db)
@@ -17,6 +17,9 @@ function droonga(application, params) {
 
   if (params.server) {
     socketIoAdapter.register(application, params.server, params);
+    params.server.on('error', function(error) {
+      connection.close();
+    });
     params.server.on('close', function() {
       // The connection can be mocked/stubbed. We don't need to close
       // such a fake connection.
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index