Fix support for sending server notifications with request-specific McpServer instances used outside their original scope. (#832)
* Fix support for sending server notifications with request-specific McpServer instances used outside their original scope. * Address feedback. * Update src/ModelContextProtocol.Core/Server/SseWriter.cs
This commit is contained in:
parent
445ea42adc
commit
93834d1aec
1 changed files with 49 additions and 6 deletions
|
|
@ -66,6 +66,7 @@ public sealed class SseResponseStreamTransport(Stream sseResponseStream, string?
|
|||
public async Task SendMessageAsync(JsonRpcMessage message, CancellationToken cancellationToken = default)
|
||||
{
|
||||
Throw.IfNull(message);
|
||||
// If the underlying writer has been disposed, just drop the message.
|
||||
await _sseWriter.SendMessageAsync(message, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue