mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-06 13:02:23 -07:00
New: Warn if UI won't update due to SignalR errors
This commit is contained in:
parent
9c64ba6cbd
commit
4fd772f62b
4 changed files with 47 additions and 8 deletions
|
@ -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() {
|
||||
|
@ -296,7 +296,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({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue