mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
New: Warn if UI won't update due to SignalR errors
This commit is contained in:
@@ -120,7 +120,7 @@ class SignalRConnector extends Component {
|
||||
|
||||
this.connection.on('receiveMessage', this.onReceiveMessage);
|
||||
|
||||
this.connection.start().then(this.onConnected);
|
||||
this.connection.start().then(this.onStart, this.onStartFail);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
@@ -242,7 +242,19 @@ class SignalRConnector extends Component {
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onConnected = () => {
|
||||
onStartFail = (error) => {
|
||||
console.error('[signalR] failed to connect');
|
||||
console.error(error);
|
||||
|
||||
this.props.dispatchSetAppValue({
|
||||
isConnected: false,
|
||||
isReconnecting: false,
|
||||
isDisconnected: false,
|
||||
isRestarting: false
|
||||
});
|
||||
}
|
||||
|
||||
onStart = () => {
|
||||
console.debug('[signalR] connected');
|
||||
|
||||
this.props.dispatchSetAppValue({
|
||||
|
Reference in New Issue
Block a user