Skip to content

Commit 9f5c37f

Browse files
committed
panic on empty sesison ID
1 parent b4dea3f commit 9f5c37f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mcp/event.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,10 @@ func (s *MemoryEventStore) After(_ context.Context, sessionID string, streamID S
328328

329329
// StreamClosed implements [EventStore.StreamClosed].
330330
func (s *MemoryEventStore) StreamClosed(_ context.Context, sessionID string, streamID StreamID) error {
331+
if sessionID == "" {
332+
panic("empty sessionID")
333+
}
334+
331335
s.mu.Lock()
332336
defer s.mu.Unlock()
333337

0 commit comments

Comments
 (0)