mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 16:11:05 +01:00
Merge branch 'dev' into V6
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user