remove redundant check for onlyNotifications
This commit is contained in:
parent
583202f81a
commit
643ef5c5e7
1 changed files with 1 additions and 3 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue