[Pkg-javascript-commits] [ltx] 135/469: router: fix error listener

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 f8e55ff5846b2043c0481a7f607bb6e3ab5679f5
Author: Astro <astro at spaceboyz.net>
Date:   Thu Sep 9 21:56:01 2010 +0200

    router: fix error listener
---
 lib/xmpp/router.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/xmpp/router.js b/lib/xmpp/router.js
index 50b129c..64ff431 100644
--- a/lib/xmpp/router.js
+++ b/lib/xmpp/router.js
@@ -402,13 +402,13 @@ Router.prototype.loadCredentials = function(domain, keyPath, certPath) {
 Router.prototype.acceptConnection = function(socket) {
     var self = this;
 
+    var inStream = new Server.IncomingServer(socket, this.credentials);
+    this.setupStream(inStream);
+
     // Unhandled 'error' events will trigger exceptions, don't let
     // that happen:
     socket.addListener('error', function() { });
-    this.addListener('error', function() { });
-
-    var inStream = new Server.IncomingServer(socket, this.credentials);
-    this.setupStream(inStream);
+    inStream.addListener('error', function() { });
 
     // incoming server wants to verify an outgoing connection of ours
     inStream.addListener('dialbackVerify', function(from, to, id, key) {

-- 
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