From e3f2eb03a5f4dc014e034cdfc65a572544421336 Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Wed, 1 Dec 2010 20:34:13 +0100 Subject: [PATCH] Fix disconnection on leaving the page --- js/main.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index 9e09865..188dfc7 100644 --- a/js/main.js +++ b/js/main.js @@ -339,9 +339,8 @@ $(document).ready(function () { }); }); -onunload = function() { +window.onunload = window.onbeforeunload = function() { if (connection) { connection.disconnect(); } } - -- 2.39.5