startHandshake counts a TLS handshake that close waits for. It returns false once the server is closing.
()
| 314 | // startHandshake counts a TLS handshake that close waits for. It returns false |
| 315 | // once the server is closing. |
| 316 | func (m *mockServer) startHandshake() bool { |
| 317 | m.mu.Lock() |
| 318 | defer m.mu.Unlock() |
| 319 | if m.closing { |
| 320 | return false |
| 321 | } |
| 322 | m.handshakes.Add(1) |
| 323 | return true |
| 324 | } |
| 325 | |
| 326 | // missingResponse is what gh gets for a request with no stored response. Its |
| 327 | // message names the request so the caller knows what to add. |