-
Notifications
You must be signed in to change notification settings - Fork 181
Open
Labels
bugSomething isn't workingSomething isn't workinggoPull requests that update go codePull requests that update go codep1MediumMediumvmcpVirtual MCP Server related issuesVirtual MCP Server related issues
Description
Storage.DeleteExpired() removes session metadata but does not release backend client connections, causing a connection leak on session expiry. Fix the cleanup path to call Close() on sessions that own resources.
Fix: In pkg/transport/session/manager.go, perform an optional interface check before deleting each expired session: if closer, ok := sess.(io.Closer); ok { closer.Close() }. This avoids adding Close() to the base Session interface (which would require all existing types t
o implement it) while still dispatching cleanup to sessions that carry resources.
Acceptance Criteria
-
DeleteExpired()callsClose()on any session that implementsio.Closerbefore removing it from storage - Sessions that do not implement
io.Closerare deleted without error (no regression for existing session types) - Backend client connections are released when a session expires (no connection leak)
-
Close()errors during cleanup are logged but do not prevent deletion - Unit tests cover:
io.Closersessions getClose()called, non-io.Closersessions deleted cleanly,Close()error does not block deletion
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggoPull requests that update go codePull requests that update go codep1MediumMediumvmcpVirtual MCP Server related issuesVirtual MCP Server related issues