(mut func(*ServerSessionState))
| 1121 | } |
| 1122 | |
| 1123 | func (ss *ServerSession) updateState(mut func(*ServerSessionState)) { |
| 1124 | ss.mu.Lock() |
| 1125 | mut(&ss.state) |
| 1126 | copy := ss.state |
| 1127 | ss.mu.Unlock() |
| 1128 | if c, ok := ss.mcpConn.(serverConnection); ok { |
| 1129 | c.sessionUpdated(copy) |
| 1130 | } |
| 1131 | } |
| 1132 | |
| 1133 | // hasInitialized reports whether the server has received the initialized |
| 1134 | // notification. |
no test coverage detected