aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2013-10-28 10:50:56 -0700
committerAdam Soltys <[email protected]>2013-10-28 10:50:56 -0700
commitc2c67af8ef58e1b1df5e2d6838582c80cff3e98b (patch)
tree6403727f53e5a8d9ae9a9e864101a757fb4cc00a
parent9edc8a787ddb552afd24ef00c3c3b7eeb0945ab9 (diff)
downloadcoinos-server-c2c67af8ef58e1b1df5e2d6838582c80cff3e98b.tar.gz
coinos-server-c2c67af8ef58e1b1df5e2d6838582c80cff3e98b.zip
Nullify socket on error
-rw-r--r--public/js/calculator.coffee1
1 files changed, 1 insertions, 0 deletions
diff --git a/public/js/calculator.coffee b/public/js/calculator.coffee
index f7f47f90..f61c3b79 100644
--- a/public/js/calculator.coffee
+++ b/public/js/calculator.coffee
@@ -112,6 +112,7 @@ setupSocket = ->
g.websocket.send('{"op":"addr_sub", "addr":"' + g.address + '"}')
g.websocket.onerror = ->
+ g.websocket = null
fail(SOCKET_FAIL)
g.websocket.onclose = ->