Skip to content

Commit

Permalink
fixed the build
Browse files Browse the repository at this point in the history
  • Loading branch information
kerryjiang committed Apr 18, 2024
1 parent 4cea48c commit 6016a3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions samples/WebSocketPushServer/PushSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ public int MessageClientReceived

protected override async ValueTask OnSessionConnectedAsync()
{
await this.SendAsync(this.SessionID);
await this.SendAsync(this.SessionID, CancellationToken.None);
}

public void Ack()
{
Interlocked.Increment(ref _messageClientReceived);
}

public override async ValueTask SendAsync(string message)
public override async ValueTask SendAsync(string message, CancellationToken cancellationToken)
{
await base.SendAsync(message);
await base.SendAsync(message, cancellationToken);
Interlocked.Increment(ref _messageSent);
}

Expand Down
2 changes: 1 addition & 1 deletion samples/WebSocketPushServer/ServerPushMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private async ValueTask<int> Push()

foreach (var s in _sessionContainer.GetSessions<PushSession>())
{
await s.SendAsync(line);
await s.SendAsync(line, CancellationToken.None);
count++;

if (_stopped)
Expand Down

0 comments on commit 6016a3f

Please sign in to comment.