Debug dashboard connection exceeded error added (#194)

This commit is contained in:
rahulhaque 2019-09-04 12:44:59 +06:00 committed by Marcel Pociot
parent 74c3e06ece
commit fa86844ea5
1 changed files with 9 additions and 0 deletions

View File

@ -142,6 +142,15 @@
this.logs = []; 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.subscribeToAllChannels();
this.subscribeToStatistics(); this.subscribeToStatistics();