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
|
|
@ -131,6 +131,7 @@ public sealed class StreamableHttpServerTransport : ITransport
|
|||
throw new InvalidOperationException("Unsolicited server to client messages are not supported in stateless mode.");
|
||||
}
|
||||
|
||||
// If the underlying writer has been disposed, just drop the message.
|
||||
await _sseWriter.SendMessageAsync(message, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue