(clientId string)
| 125 | } |
| 126 | |
| 127 | func (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 | |
| 140 | func (c *ClientImpl) clientTakeover(clientId string) { |
| 141 | c.Lock.Lock() |
no outgoing calls
no test coverage detected