Commit e94a93a9 authored by Yanming Zhou's avatar Yanming Zhou Committed by Christian Tzolov
Browse files

fix: Add null check for response ID to prevent memory leaks



- Check if response.id() is not null before processing in MCP session classes
- Log error when MCP response lacks session ID to warn about potential memory leaks
- Improve error handling in McpStreamableServerSession with proper error codes

The missing null check could lead to memory leaks as pending requests
would never be completed when responses lack session IDs. This fix ensures
proper handling of such cases with appropriate error logging.

Resolves #506

Signed-off-by: default avatarYanming Zhou <zhouyanming@gmail.com>
parent 210a8139
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment