Wrap each request in a service scope (#276)
* Wrap each request in a service scope * Change request/notification delegates to return ValueTask * Address feedback
This commit is contained in:
parent
f1cc2d81de
commit
f4c87f5e2f
1 changed files with 477 additions and 306 deletions
|
|
@ -39,7 +39,7 @@ public class CancellationTests : ClientServerTestBase
|
|||
await using (Server.RegisterNotificationHandler(NotificationMethods.CancelledNotification, (notification, cancellationToken) =>
|
||||
{
|
||||
gotCancellation = true;
|
||||
return Task.CompletedTask;
|
||||
return default;
|
||||
}))
|
||||
{
|
||||
await Assert.ThrowsAsync<OperationCanceledException>(() => client.ListToolsAsync(cancellationToken: new CancellationToken(true)));
|
||||
|
|
|
|||
Loading…
Reference in a new issue