Avoid exception being thrown when server status updates from service
This commit is contained in:
parent
03626a75d0
commit
bd15ceaa5b
1 changed files with 5 additions and 7 deletions
|
@ -81,23 +81,21 @@
|
|||
if (args?.Server?.Id == ServerId)
|
||||
{
|
||||
Status = args.Status;
|
||||
StateHasChanged();
|
||||
|
||||
if (Status == ServerProcessStatus.Error)
|
||||
{
|
||||
NotificationService.Error(new NotificationConfig
|
||||
{
|
||||
Message = $"Error starting server {args.Server.Name}",
|
||||
Description = args.Exception.Message,
|
||||
}
|
||||
);
|
||||
{
|
||||
Message = $"Error starting server {args.Server.Name}",
|
||||
Description = args.Exception.Message,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async Task Start()
|
||||
{
|
||||
ServerProcessService.StartServerAsync(Server);
|
||||
await ServerProcessService.StartServerAsync(Server);
|
||||
}
|
||||
|
||||
private void Stop()
|
||||
|
|
Loading…
Add table
Reference in a new issue