Skip to content

Commit 643ef5c

Browse files
committed
remove redundant check for onlyNotifications
1 parent 583202f commit 643ef5c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/server/streamableHttp.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,10 +382,8 @@ export class StreamableHTTPServerTransport implements Transport {
382382

383383
// check if it contains requests
384384
const hasRequests = messages.some(isJSONRPCRequest);
385-
const hasOnlyNotificationsOrResponses = messages.every(msg =>
386-
isJSONRPCNotification(msg) || isJSONRPCResponse(msg));
387385

388-
if (hasOnlyNotificationsOrResponses) {
386+
if (!hasRequests) {
389387
// if it only contains notifications or responses, return 202
390388
res.writeHead(202).end();
391389

0 commit comments

Comments
 (0)