We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6bada5f + d3f400f commit 52371a3Copy full SHA for 52371a3
lib/mcp/server/transports/streamable_http_transport.rb
@@ -150,8 +150,8 @@ def reap_expired_sessions
150
# removed from `@sessions` above, so other threads will not find them
151
# and will not attempt to close the same stream.
152
stream.close
153
- rescue
154
- nil
+ rescue StandardError
+ # Ignore close-related errors from already closed/broken streams.
155
end
156
157
@@ -239,8 +239,8 @@ def cleanup_session_unsafe(session_id)
239
240
begin
241
session[:stream]&.close
242
243
244
245
@sessions.delete(session_id)
246
0 commit comments