Merge branch 'dev' into V6

This commit is contained in:
Jordan Dominion
2023-11-07 08:26:38 -05:00
8 changed files with 84 additions and 8 deletions
+6 -1
View File
@@ -372,13 +372,15 @@ namespace Tgstation.Server.Client
retryPolicy ??= new InfiniteThirtySecondMaxRetryPolicy();
var wrappedPolicy = new ApiClientTokenRefreshRetryPolicy(this, retryPolicy);
HubConnection? hubConnection = null;
var hubConnectionBuilder = new HubConnectionBuilder()
.AddNewtonsoftJsonProtocol(options =>
{
options.PayloadSerializerSettings = SerializerSettings;
})
.WithAutomaticReconnect(retryPolicy)
.WithAutomaticReconnect(wrappedPolicy)
.WithUrl(
new Uri(Url, Routes.JobsHub),
HttpTransportType.ServerSentEvents,
@@ -480,6 +482,9 @@ namespace Tgstation.Server.Client
if (content == null && (method == HttpMethod.Post || method == HttpMethod.Put))
throw new InvalidOperationException("content cannot be null for POST or PUT!");
if (disposed)
throw new ObjectDisposedException(nameof(ApiClient));
HttpResponseMessage response;
var fullUri = new Uri(Url, route);
var serializerSettings = SerializerSettings;