Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/mcp_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ using method_handler = std::function<json(const json&, const std::string&)>;
using tool_handler = method_handler;
using notification_handler = std::function<void(const json&, const std::string&)>;
using auth_handler = std::function<bool(const std::string&, const std::string&)>;
using session_cleanup_handler = std::function<void(const std::string&)>;
using session_cleanup_handler = std::function<void(const std::string& key, const std::string& session_id)>;

class event_dispatcher {
public:
Expand Down
2 changes: 1 addition & 1 deletion src/mcp_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ void server::close_session(const std::string& session_id) {
// Clean up resources safely
try {
for (const auto& [key, handler] : session_cleanup_handler_) {
handler(key);
handler(key, session_id);
}

// Copy resources to be processed
Expand Down