Skip to content

Commit

Permalink
rebase from optimize handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Mar 4, 2025
1 parent e604e01 commit b23e060
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/torii/server/src/handlers/mcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ struct ResourceCapabilities {
}

// Structure to hold SSE session information
#[derive(Clone, Debug)]
struct SseSession {
tx: broadcast::Sender<JsonRpcResponse>,
session_id: String,
}

#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct McpHandler {
pool: Arc<SqlitePool>,
// Map of session IDs to SSE sessions
Expand Down Expand Up @@ -610,7 +611,7 @@ impl Handler for McpHandler {
req.uri().path().starts_with("/mcp")
}

async fn handle(&self, req: Request<Body>) -> Response<Body> {
async fn handle(&self, req: Request<Body>, _: IpAddr) -> Response<Body> {
let uri_path = req.uri().path();

// Handle CORS preflight requests
Expand Down

0 comments on commit b23e060

Please sign in to comment.