reorder the stopping of timeouts and clientrequests (to avoid ObjectDisposed exceptions)

This commit is contained in:
sebastianburckhardt 2023-04-20 09:36:47 -07:00
Родитель 3b74b846cf
Коммит 9d964f7046
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -80,8 +80,6 @@ namespace DurableTask.Netherite
// cancel the token, if not already cancelled.
this.cts.Cancel();
await this.ResponseTimeouts.StopAsync();
// We now enter the final stage of client shutdown, where we forcefully cancel
// all requests that have not completed yet.
this.allRemainingRequestsAreNowBeingCancelled = true;
@ -98,6 +96,8 @@ namespace DurableTask.Netherite
}
}
await this.ResponseTimeouts.StopAsync();
this.cts.Dispose();
this.traceHelper.TraceProgress("Stopped");