projects
/
KiwiIRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7cb4d5
)
Cleaning up existing WebsocketRpc instances on reconnect
author
Darren
<darren@darrenwhitlen.com>
Fri, 19 Sep 2014 13:34:22 +0000
(14:34 +0100)
committer
Darren
<darren@darrenwhitlen.com>
Fri, 19 Sep 2014 13:34:22 +0000
(14:34 +0100)
client/src/models/gateway.js
patch
|
blob
|
blame
|
history
diff --git
a/client/src/models/gateway.js
b/client/src/models/gateway.js
index a8d8f1af3fbdf72892c662bf440814a952db8bfa..7fe7cf3bdd489e26f8c8b44f32e1fccd6cd4a533 100644
(file)
--- a/
client/src/models/gateway.js
+++ b/
client/src/models/gateway.js
@@
-40,6
+40,10
@@
_kiwi.model.Gateway = Backbone.Model.extend({
reconnect_delay: 2000
\r
});
\r
\r
+ // If we have an existing RPC object, clean it up before replacing it
\r
+ if (this.rpc) {
\r
+ rpc.dispose();
\r
+ }
\r
this.rpc = new EngineioTools.Rpc(this.socket);
\r
\r
this.socket.on('connect_failed', function (reason) {
\r