Merge pull request #314 from koic/remove_redundant_respond_to_flush
Remove redundant `respond_to?(:flush)` guard in `StreamableHTTPTransport`
This commit is contained in:
commit
52f8384e9d
1 changed files with 2 additions and 2 deletions
|
|
@ -269,12 +269,12 @@ module MCP
|
|||
def send_to_stream(stream, data)
|
||||
message = data.is_a?(String) ? data : data.to_json
|
||||
stream.write("data: #{message}\n\n")
|
||||
stream.flush if stream.respond_to?(:flush)
|
||||
stream.flush
|
||||
end
|
||||
|
||||
def send_ping_to_stream(stream)
|
||||
stream.write(": ping #{Time.now.iso8601}\n\n")
|
||||
stream.flush if stream.respond_to?(:flush)
|
||||
stream.flush
|
||||
end
|
||||
|
||||
def handle_post(request)
|
||||
|
|
|
|||
Loading…
Reference in a new issue