[Pkg-javascript-commits] [ltx] 155/469: client ctor: move var self to broader scope

Jonas Smedegaard dr at jones.dk
Wed Aug 31 13:01:19 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 a2ec82a7303ea135dd82b05a8c40214aa86de4bc
Author: Astro <astro at spaceboyz.net>
Date:   Fri Oct 15 18:50:17 2010 +0200

    client ctor: move var self to broader scope
---
 lib/xmpp/client.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/xmpp/client.js b/lib/xmpp/client.js
index bd83735..40b0501 100644
--- a/lib/xmpp/client.js
+++ b/lib/xmpp/client.js
@@ -28,6 +28,7 @@ var IQID_SESSION = 'sess',
  *   port: Number (optional)
  */
 function Client(params) {
+    var self = this;
     Connection.Connection.call(this);
 
     if (typeof params.jid == 'string')
@@ -47,7 +48,6 @@ function Client(params) {
     if (params.host) {
         this.socket.connect(params.port || 5222, params.host);
     } else {
-        var self = this;
         var attempt = SRV.connect(this.socket,
                                   ['_xmpp-client._tcp'], this.jid.domain, 5222);
         attempt.addListener('connect', function() {

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