Skip to content

Commit 32bdaf3

Browse files
committed
null out token
1 parent 99e056f commit 32bdaf3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/SignalR/common/Http.Connections/src/Internal/HttpConnectionContext.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,15 @@ internal async Task<bool> CancelPreviousPoll(HttpContext context)
445445
lock (_stateLock)
446446
{
447447
// Need to sync cts access with DisposeAsync as that will dispose the cts
448-
cts = Status == HttpConnectionStatus.Disposed ? null : Cancellation;
448+
if (Status == HttpConnectionStatus.Disposed)
449+
{
450+
cts = null;
451+
}
452+
else
453+
{
454+
cts = Cancellation;
455+
Cancellation = null;
456+
}
449457
}
450458

451459
using (cts)

0 commit comments

Comments
 (0)