-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Describe the bug
This is caused by an issue with the rmcp crate: modelcontextprotocol/rust-sdk#572
ie. the connection to an MCP server is never getting formally closed, which can cause the session to stay open on the server side. If this is an authenticated connection this can bar the user from creating a new client until the old session expires.
On goose, this means that once I close the application, I get authentications errors when connecting to the same extension server again until the old session expires on the server side (can take a long time).
A workaround I have found for this is to call .cancel() on the client before dropping it, which appears to close the connection explicitly, though ideally this can be done automatically on Drop (async drop issues aside), and to actually close the transport, rather than cancelling it.