Close shuts down the server, closing the WireGuard engine and DERP connections.
()
| 536 | |
| 537 | // Close shuts down the server, closing the WireGuard engine and DERP connections. |
| 538 | func (s *Server) Close() error { |
| 539 | if s.lb == nil { |
| 540 | return nil // never started |
| 541 | } |
| 542 | return s.lb.Close() |
| 543 | } |
| 544 | |
| 545 | // DrainTCP waits until every TCP connection in the server's netstack |
| 546 | // has fully closed, meaning the peer has acknowledged all sent data |
no outgoing calls