Skip to content

Commit cfbbab2

Browse files
committed
clean up unused code
1 parent d8c570f commit cfbbab2

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

server/streamable_http.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ type StreamableHTTPServer struct {
217217
sessionIDGenerator func() string
218218
enableJSONResponse bool
219219
eventStore EventStore
220-
standaloneStreamID string
221220
streamMapping sync.Map // Maps streamID to response writer
222221
requestToStreamMap sync.Map // Maps requestID to streamID
223222
statelessMode bool
@@ -230,7 +229,6 @@ func NewStreamableHTTPServer(server *MCPServer, opts ...StreamableHTTPOption) *S
230229
endpoint: "/mcp",
231230
sessionIDGenerator: func() string { return uuid.New().String() },
232231
enableJSONResponse: false,
233-
standaloneStreamID: "_GET_stream",
234232
}
235233

236234
// Apply all options
@@ -646,9 +644,6 @@ func (s *StreamableHTTPServer) handleGet(w http.ResponseWriter, r *http.Request)
646644
w.Header().Set("Connection", "keep-alive")
647645
w.WriteHeader(http.StatusOK)
648646

649-
// Generate a unique ID for this stream
650-
s.standaloneStreamID = uuid.New().String()
651-
652647
// Send an initial event to confirm the connection is established
653648
initialEvent := fmt.Sprintf("data: {\"jsonrpc\": \"2.0\", \"method\": \"connection/established\"}\n\n")
654649
if _, err := fmt.Fprint(w, initialEvent); err != nil {

0 commit comments

Comments
 (0)