Skip to content

Commit 7f764d7

Browse files
committed
refactor(server): update terminology from sessionizer to sessions for clarity
1 parent f96dacc commit 7f764d7

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

server/server.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ func (s *MCPServer) AddTools(tools ...ServerTool) {
416416
}
417417
s.mu.Unlock()
418418

419-
// Send notification to all initialized sessionizer
419+
// Send notification to all initialized sessions
420420
s.sendNotificationToAllClients("notifications/tools/list_changed", nil)
421421
}
422422

@@ -436,7 +436,7 @@ func (s *MCPServer) DeleteTools(names ...string) {
436436
}
437437
s.mu.Unlock()
438438

439-
// Send notification to all initialized sessionizer
439+
// Send notification to all initialized sessions
440440
s.sendNotificationToAllClients("notifications/tools/list_changed", nil)
441441
}
442442

server/server_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func TestMCPServer_Tools(t *testing.T) {
153153
validate func(*testing.T, []mcp.JSONRPCNotification, mcp.JSONRPCMessage)
154154
}{
155155
{
156-
name: "SetTools sends no notifications/tools/list_changed without active sessionizer",
156+
name: "SetTools sends no notifications/tools/list_changed without active sessions",
157157
action: func(t *testing.T, server *MCPServer, notificationChannel chan mcp.JSONRPCNotification) {
158158
server.SetTools(ServerTool{
159159
Tool: mcp.NewTool("test-tool-1"),
@@ -216,7 +216,7 @@ func TestMCPServer_Tools(t *testing.T) {
216216
})
217217
require.NoError(t, err)
218218
}
219-
// also let's register inactive sessionizer
219+
// also let's register inactive sessions
220220
for i := range 5 {
221221
err := server.RegisterSession(&fakeSession{
222222
sessionID: fmt.Sprintf("test%d", i+5),

server/sse.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func (s *SSEServer) Start(addr string) error {
167167
return s.srv.ListenAndServe()
168168
}
169169

170-
// Shutdown gracefully stops the SSE server, closing all active sessionizer
170+
// Shutdown gracefully stops the SSE server, closing all active sessions
171171
// and shutting down the HTTP server.
172172
func (s *SSEServer) Shutdown(ctx context.Context) error {
173173
if s.srv != nil {

server/sse_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func TestSSEServer(t *testing.T) {
122122
}
123123
})
124124

125-
t.Run("Can handle multiple sessionizer", func(t *testing.T) {
125+
t.Run("Can handle multiple sessions", func(t *testing.T) {
126126
mcpServer := NewMCPServer("test", "1.0.0",
127127
WithResourceCapabilities(true, true),
128128
)
@@ -238,9 +238,9 @@ func TestSSEServer(t *testing.T) {
238238

239239
select {
240240
case <-done:
241-
// All sessionizer completed successfully
241+
// All sessions completed successfully
242242
case <-time.After(5 * time.Second):
243-
t.Fatal("Timeout waiting for sessionizer to complete")
243+
t.Fatal("Timeout waiting for sessions to complete")
244244
}
245245
})
246246

0 commit comments

Comments
 (0)