From c2c67af8ef58e1b1df5e2d6838582c80cff3e98b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 28 Oct 2013 10:50:56 -0700 Subject: Nullify socket on error --- public/js/calculator.coffee | 1 + 1 file changed, 1 insertion(+) 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 = -> -- cgit v1.2.3