Skip to content

Commit 7d2dfc7

Browse files
committed
Debug
1 parent aea19b6 commit 7d2dfc7

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

conformance/expected_failures.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,3 @@ server:
55
- tools-call-elicitation
66
- elicitation-sep1034-defaults
77
- elicitation-sep1330-enums
8-
# Fails on CI (Ubuntu, Ruby 4.0) but passes locally. Root cause under investigation.
9-
- tools-call-with-logging

lib/mcp/server/transports/streamable_http_transport.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def send_notification(method, params = nil, session_id: nil)
5858
begin
5959
send_to_stream(session[:stream], notification)
6060
true
61-
rescue IOError, Errno::EPIPE => e
61+
rescue IOError, Errno::EPIPE, Errno::ECONNRESET => e
6262
MCP.configuration.exception_reporter.call(
6363
e,
6464
{ session_id: session_id, error: "Failed to send notification" },
@@ -77,7 +77,7 @@ def send_notification(method, params = nil, session_id: nil)
7777
begin
7878
send_to_stream(session[:stream], notification)
7979
sent_count += 1
80-
rescue IOError, Errno::EPIPE => e
80+
rescue IOError, Errno::EPIPE, Errno::ECONNRESET => e
8181
MCP.configuration.exception_reporter.call(
8282
e,
8383
{ session_id: sid, error: "Failed to send notification" },
@@ -289,7 +289,7 @@ def send_response_to_stream(stream, response, session_id)
289289
message = JSON.parse(response)
290290
send_to_stream(stream, message)
291291
[200, { "Content-Type" => "application/json" }, [{ accepted: true }.to_json]]
292-
rescue IOError, Errno::EPIPE => e
292+
rescue IOError, Errno::EPIPE, Errno::ECONNRESET => e
293293
MCP.configuration.exception_reporter.call(
294294
e,
295295
{ session_id: session_id, error: "Stream closed during response" },
@@ -366,7 +366,7 @@ def send_keepalive_ping(session_id)
366366
send_ping_to_stream(@sessions[session_id][:stream])
367367
end
368368
end
369-
rescue IOError, Errno::EPIPE => e
369+
rescue IOError, Errno::EPIPE, Errno::ECONNRESET => e
370370
MCP.configuration.exception_reporter.call(
371371
e,
372372
{ session_id: session_id, error: "Stream closed" },

0 commit comments

Comments
 (0)