From fa86844ea5b038902ec77b4cd28512ca030927fa Mon Sep 17 00:00:00 2001 From: rahulhaque Date: Wed, 4 Sep 2019 12:44:59 +0600 Subject: [PATCH] Debug dashboard connection exceeded error added (#194) --- resources/views/dashboard.blade.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index d929253..0d97e7e 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -142,6 +142,15 @@ this.logs = []; }); + this.pusher.connection.bind('error', event => { + if (event.error.data.code === 4100) { + $('div#status').text("Maximum connection limit exceeded!"); + this.connected = false; + this.logs = []; + throw new Error("Over capacity"); + } + }); + this.subscribeToAllChannels(); this.subscribeToStatistics();