MCPcopy
hub / github.com/wavetermdev/waveterm / checkClientId

Method checkClientId

tsunami/engine/clientimpl.go:127–138  ·  view source on GitHub ↗
(clientId string)

Source from the content-addressed store, hash-verified

125}
126
127func (c *ClientImpl) checkClientId(clientId string) error {
128 if clientId == "" {
129 return fmt.Errorf("client id cannot be empty")
130 }
131 c.Lock.Lock()
132 defer c.Lock.Unlock()
133 if c.CurrentClientId == "" || c.CurrentClientId == clientId {
134 c.CurrentClientId = clientId
135 return nil
136 }
137 return fmt.Errorf("client id mismatch: expected %s, got %s", c.CurrentClientId, clientId)
138}
139
140func (c *ClientImpl) clientTakeover(clientId string) {
141 c.Lock.Lock()

Callers 2

handleRenderMethod · 0.80
handleSSEMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected