()
| 511 | } |
| 512 | |
| 513 | func (c *core) close() error { |
| 514 | c.mutex.Lock() |
| 515 | defer c.mutex.Unlock() |
| 516 | if c.closed { |
| 517 | return nil |
| 518 | } |
| 519 | c.closed = true |
| 520 | for id := range c.peers { |
| 521 | // when closing, mark them as LOST so that we don't disrupt in-progress |
| 522 | // connections. |
| 523 | c.removePeerLocked(id, proto.CoordinateResponse_PeerUpdate_LOST, "coordinator close", |
| 524 | CloseErrCoordinatorClose) |
| 525 | } |
| 526 | return nil |
| 527 | } |
| 528 | |
| 529 | func (c *coordinator) ServeHTTPDebug(w http.ResponseWriter, r *http.Request) { |
| 530 | c.core.serveHTTPDebug(w, r) |
nothing calls this directly
no test coverage detected