From c6a65334df734e7f65293635a66ed912b35c9fcb Mon Sep 17 00:00:00 2001 From: Darren Date: Fri, 30 Aug 2013 14:04:28 +0100 Subject: [PATCH] gateway.reconnect() callback being used --- client/assets/src/models/gateway.js | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/client/assets/src/models/gateway.js b/client/assets/src/models/gateway.js index 4ff208a..b280294 100644 --- a/client/assets/src/models/gateway.js +++ b/client/assets/src/models/gateway.js @@ -141,23 +141,7 @@ _kiwi.model.Gateway = function () { this.socket.close(); this.socket = null; - this.connect(); - return; - - // To get around the allow-origin issues for requests, completely reload the - // transport source from the new server - window.io = null; - - // Path to get the socket.io transport code - transport_path = _kiwi.app.kiwi_server + _kiwi.app.get('base_path') + '/transport/socket.io.js?ts='+(new Date().getTime()); - $script(transport_path, function() { - if (!window.io) { - return callback('err_kiwi_server_not_found'); - } - - that.set('kiwi_server', _kiwi.app.kiwi_server + '/kiwi'); - that.connect(callback); - }); + this.connect(callback); }; @@ -278,6 +262,8 @@ _kiwi.model.Gateway = function () { password: connection_info.password }; + connection_info.options = connection_info.options || {}; + // A few optional parameters if (connection_info.options.encoding) server_info.encoding = connection_info.options.encoding; -- 2.25.1