Skip to content

Commit 2697f14

Browse files
committed
apply suggested changes
1 parent 2dda87e commit 2697f14

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/mcp/server/streamable_http.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -547,11 +547,9 @@ async def _handle_get_request(self, request: Request, send: Send) -> None:
547547
if not await self._validate_session(request, send):
548548
return
549549
# Handle resumability: check for Last-Event-ID header
550-
if self._event_store:
551-
last_event_id = request.headers.get(LAST_EVENT_ID_HEADER)
552-
if last_event_id:
553-
await self._replay_events(last_event_id, request, send)
554-
return
550+
if last_event_id := request.headers.get(LAST_EVENT_ID_HEADER):
551+
await self._replay_events(last_event_id, request, send)
552+
return
555553

556554
headers = {
557555
"Cache-Control": "no-cache, no-transform",

0 commit comments

Comments
 (0)