Skip to content

Commit 5faf6ee

Browse files
committed
Add missing subscription CancellationToken
1 parent e5f08c3 commit 5faf6ee

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Tgstation.Server.Host/GraphQL/Subscription.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Threading;
23
using System.Threading.Tasks;
34

45
using HotChocolate;
@@ -34,16 +35,18 @@ public static string SessionInvalidatedTopic(IAuthenticationContext authenticati
3435
/// <param name="receiver">The <see cref="ITopicEventReceiver"/>.</param>
3536
/// <param name="invalidationTracker">The <see cref="ISessionInvalidationTracker"/>.</param>
3637
/// <param name="authenticationContext">The <see cref="IAuthenticationContext"/> for the request.</param>
38+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation.</param>
3739
/// <returns>A <see cref="ValueTask{TResult}"/> resulting in a <see cref="ISourceStream{TMessage}"/> of the <see cref="SessionInvalidationReason"/> for the <paramref name="authenticationContext"/>.</returns>
3840
public ValueTask<ISourceStream<SessionInvalidationReason>> SessionInvalidatedStream(
3941
[Service] ITopicEventReceiver receiver,
4042
[Service] ISessionInvalidationTracker invalidationTracker,
41-
[Service] IAuthenticationContext authenticationContext)
43+
[Service] IAuthenticationContext authenticationContext,
44+
CancellationToken cancellationToken)
4245
{
4346
ArgumentNullException.ThrowIfNull(receiver);
4447
ArgumentNullException.ThrowIfNull(invalidationTracker);
4548

46-
var subscription = receiver.SubscribeAsync<SessionInvalidationReason>(SessionInvalidatedTopic(authenticationContext));
49+
var subscription = receiver.SubscribeAsync<SessionInvalidationReason>(SessionInvalidatedTopic(authenticationContext), cancellationToken);
4750
invalidationTracker.TrackSession(authenticationContext);
4851
return subscription;
4952
}

0 commit comments

Comments
 (0)