mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 19:47:21 +01:00
some minor fixes
This commit is contained in:
parent
24960fd1ba
commit
3383de7294
3 changed files with 8 additions and 6 deletions
|
|
@ -215,7 +215,7 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
|
|||
catch (InvalidOperationException ex)
|
||||
{
|
||||
Logger.LogWarning(ex, "InvalidOperationException on connection");
|
||||
ServerState = ServerState.Disconnected;
|
||||
await StopConnection(ServerState.Disconnected).ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -106,11 +106,10 @@ public sealed class TokenProvider : IDisposable, IMediatorSubscriber
|
|||
if (jwtToken.ValidTo.Subtract(TimeSpan.FromHours(6).Add(TimeSpan.FromMinutes(1))) > DateTime.UtcNow)
|
||||
{
|
||||
_tokenCache.TryRemove(CurrentIdentifier, out _);
|
||||
Mediator.Publish(new NotificationMessage("Invalid timezone", "The time zone of your computer is invalid. " +
|
||||
Mediator.Publish(new NotificationMessage("Invalid system clock", "The clock of your computer is invalid. " +
|
||||
"Mare will not function properly if the time zone is not set correctly. " +
|
||||
"Please set your computers time zone correctly and keep it synchronized with the internet.",
|
||||
"Please set your computers time zone correctly and keep your clock synchronized with the internet.",
|
||||
Dalamud.Interface.Internal.Notifications.NotificationType.Error));
|
||||
Mediator.Publish(new DisconnectedMessage());
|
||||
throw new InvalidOperationException($"JwtToken is behind DateTime.UtcNow, DateTime.UtcNow is possibly wrong. DateTime.UtcNow is {DateTime.UtcNow}, JwtToken.ValidTo is {jwtToken.ValidTo}");
|
||||
}
|
||||
return response;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue