From 072074c2c083e09eeaadfe69faa63c7617bd879f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 24 Apr 2012 13:42:28 +0200 Subject: Fix a bug on xhrPolling failing to use the proper URL on reconnect --- priv/bullet.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/priv/bullet.js b/priv/bullet.js index c593646..e6a4268 100644 --- a/priv/bullet.js +++ b/priv/bullet.js @@ -67,7 +67,6 @@ var timeout; var xhr; - var fakeurl = url.replace('ws:', 'http:').replace('wss:', 'https:'); var fake = { readyState: CONNECTING, send: function(data){ @@ -75,6 +74,8 @@ return false; } + var fakeurl = url.replace('ws:', 'http:').replace('wss:', 'https:'); + $.ajax({ async: false, cache: false, @@ -107,6 +108,8 @@ }; function poll(){ + var fakeurl = url.replace('ws:', 'http:').replace('wss:', 'https:'); + xhr = $.ajax({ type: 'GET', cache: false, -- cgit v1.2.3