Skip to content

Commit 51f38f7

Browse files
committed
Rephrase comment
1 parent ea6c81a commit 51f38f7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/MCP/Base/Transports/HTTPClientTransport.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ public actor HTTPClientTransport: Actor, Transport {
205205

206206
// Check response status
207207
guard httpResponse.statusCode == 200 else {
208-
// For servers that don't support streaming from this endpoint
209-
// they should return a 405 NOT ALLOWED. So lets cancel the task
210-
// instead of retrying
208+
// If the server returns 405 Method Not Allowed,
209+
// it indicates that the server doesn't support SSE streaming.
210+
// We should cancel the task instead of retrying the connection.
211211
if httpResponse.statusCode == 405 {
212212
self.streamingTask?.cancel()
213213
}

0 commit comments

Comments
 (0)