From 2d90635dc83d1d4b846a36f47260fb2d81bfc138 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Fri, 24 May 2013 11:39:30 -0400 Subject: [PATCH] added 500ms delay to disconnect message --- public/src/app.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/public/src/app.js b/public/src/app.js index 0660913cf4..1f9d04c719 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -50,13 +50,15 @@ var socket, }); socket.on('disconnect', function(data){ - app.alert({ - alert_id: 'connection_alert', - title: 'Disconnect', - message: 'You have disconnected from NodeBB, we will try to reconnect!', - type: 'error', - timeout: 5000 - }); + setTimeout(function() { + app.alert({ + alert_id: 'connection_alert', + title: 'Disconnect', + message: 'You have disconnected from NodeBB, we will try to reconnect!', + type: 'error', + timeout: 5000 + }); + }, 500); }); socket.on('reconnecting', function(data) {