Don't conflate request and response IDs in Streamable HTTP transports (#475)
This commit is contained in:
parent
e0b058f260
commit
046903c27b
1 changed files with 147 additions and 26 deletions
|
|
@ -60,7 +60,7 @@ internal sealed class StreamableHttpPostTransport(StreamableHttpServerTransport
|
|||
{
|
||||
yield return message;
|
||||
|
||||
if (message.Data is JsonRpcMessageWithId response && response.Id == _pendingRequest)
|
||||
if (message.Data is JsonRpcResponse or JsonRpcError && ((JsonRpcMessageWithId)message.Data).Id == _pendingRequest)
|
||||
{
|
||||
// Complete the SSE response stream now that all pending requests have been processed.
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue