remove redundant check for onlyNotifications

This commit is contained in:
ihrpr 2025-04-15 09:26:08 +01:00
commit 643ef5c5e7
No known key found for this signature in database

View file

@ -382,10 +382,8 @@ export class StreamableHTTPServerTransport implements Transport {
// check if it contains requests
const hasRequests = messages.some(isJSONRPCRequest);
const hasOnlyNotificationsOrResponses = messages.every(msg =>
isJSONRPCNotification(msg) || isJSONRPCResponse(msg));
if (hasOnlyNotificationsOrResponses) {
if (!hasRequests) {
// if it only contains notifications or responses, return 202
res.writeHead(202).end();