diff --git a/src/FishyFlip/ATProtocol.cs b/src/FishyFlip/ATProtocol.cs index a8a4d30d..372d79dd 100644 --- a/src/FishyFlip/ATProtocol.cs +++ b/src/FishyFlip/ATProtocol.cs @@ -192,6 +192,7 @@ public Task StopSubscriptionAsync(CancellationToken? token = default) public void UpdateOptions(ATProtocolOptions options) { this.options = options; + this.options.UpdateHttpClient(options.Url); this.client = options.HttpClient ?? throw new NullReferenceException(nameof(options.HttpClient)); this.webSocketProtocol.Dispose(); this.sessionManager.Dispose(); @@ -248,8 +249,8 @@ internal void OnUserLoggedIn(Session session) else { this.Options.Url = uriResult; - logger?.LogInformation($"UseServiceEndpointUponLogin enabled, switching to {uriResult}."); this.Options.Session = session; + logger?.LogInformation($"UseServiceEndpointUponLogin enabled, switching to {uriResult}."); this.UpdateOptions(this.Options); return; }