From 10ef09964359134c0433988920266d573dc1b5da Mon Sep 17 00:00:00 2001 From: hunterlester Date: Wed, 14 Dec 2016 13:52:12 -0800 Subject: [PATCH] adds disconnect event for socket io --- index.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.html b/index.html index d91db7e..431f402 100755 --- a/index.html +++ b/index.html @@ -53,6 +53,11 @@ console.log("socket.io initialized..."); }); + socket.on('disconnect', function() { + console.log('connection lost'); + alert('We sorry; connection lost.'); + }); + return gov; };