mirror of https://github.com/Radarr/Radarr
Add delay before showing backend connection lost
This commit is contained in:
parent
6fde48ce6b
commit
f1f13e6248
|
@ -29,6 +29,7 @@ define(
|
|||
|
||||
var tryingToReconnect = false;
|
||||
var messengerId = 'signalR';
|
||||
var reconnectTimeout;
|
||||
|
||||
this.signalRconnection = $.connection('/signalr');
|
||||
|
||||
|
@ -47,15 +48,18 @@ define(
|
|||
|
||||
tryingToReconnect = true;
|
||||
|
||||
Messenger.show({
|
||||
id : messengerId,
|
||||
type : 'info',
|
||||
hideAfter : 0,
|
||||
message : 'Connection to backend lost, attempting to reconnect'
|
||||
});
|
||||
reconnectTimeout = window.setTimeout(function () {
|
||||
Messenger.show({
|
||||
id : messengerId,
|
||||
type : 'info',
|
||||
hideAfter : 0,
|
||||
message : 'Connection to backend lost, attempting to reconnect'
|
||||
});
|
||||
}, 10000);
|
||||
});
|
||||
|
||||
this.signalRconnection.reconnected(function() {
|
||||
window.clearTimeout(reconnectTimeout);
|
||||
tryingToReconnect = false;
|
||||
|
||||
var currentVersion = StatusModel.get('version');
|
||||
|
|
Loading…
Reference in New Issue