[Pkg-javascript-commits] [sockjs-client] 297/350: Fix #238 transport timeout before open should fallback

tonnerre at ancient-solutions.com tonnerre at ancient-solutions.com
Fri Aug 5 01:04:32 UTC 2016


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

tonnerre-guest pushed a commit to branch upstream
in repository sockjs-client.

commit bc59fd4cfc397cd074de01f18636c490b13a5aa3
Author: Bryce Kahle <bkahle at gmail.com>
Date:   Tue May 5 12:30:17 2015 -0700

    Fix #238 transport timeout before open should fallback
---
 lib/main.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/main.js b/lib/main.js
index a6177b1..9b6c90a 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -205,11 +205,11 @@ SockJS.prototype._connect = function() {
 
     var transportUrl = urlUtils.addPath(this._transUrl, '/' + this._server + '/' + random.string(8));
     debug('transport url', transportUrl);
-    var transport = new Transport(transportUrl, this._transUrl);
-    transport.on('message', this._transportMessage.bind(this));
-    transport.once('close', this._transportClose.bind(this));
-    transport.transportName = Transport.transportName;
-    this._transport = transport;
+    var transportObj = new Transport(transportUrl, this._transUrl);
+    transportObj.on('message', this._transportMessage.bind(this));
+    transportObj.once('close', this._transportClose.bind(this));
+    transportObj.transportName = Transport.transportName;
+    this._transport = transportObj;
 
     return;
   }
@@ -219,7 +219,7 @@ SockJS.prototype._connect = function() {
 SockJS.prototype._transportTimeout = function() {
   debug('_transportTimeout');
   if (this.readyState === SockJS.CONNECTING) {
-    this._close(2007, 'Transport timed out');
+    this._transportClose(2007, 'Transport timed out');
   }
 };
 

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



More information about the Pkg-javascript-commits mailing list