[Pkg-javascript-commits] [ltx] 133/469: router: hook 'error' of incoming connections

Jonas Smedegaard dr at jones.dk
Wed Aug 31 13:01:15 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository ltx.

commit 56dc14ff8c63051fabc900d1587d2b7476d338dc
Author: Astro <astro at spaceboyz.net>
Date:   Thu Sep 9 21:18:41 2010 +0200

    router: hook 'error' of incoming connections
---
 lib/xmpp/router.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/xmpp/router.js b/lib/xmpp/router.js
index 0c0cb78..6ff63dd 100644
--- a/lib/xmpp/router.js
+++ b/lib/xmpp/router.js
@@ -400,6 +400,10 @@ Router.prototype.loadCredentials = function(domain, keyPath, certPath) {
 Router.prototype.acceptConnection = function(socket) {
     var self = this;
 
+    // Unhandled 'error' events will trigger exceptions, don't let
+    // that happen:
+    socket.addListener('error', function() { });
+
     var inStream = new Server.IncomingServer(socket, this.credentials);
     this.setupStream(inStream);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/ltx.git



More information about the Pkg-javascript-commits mailing list