mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
chore(peer_server): more explanation for asyncRemove
This commit is contained in:
parent
bed20b7837
commit
5465201292
@ -304,8 +304,11 @@ func (s *PeerServer) Stop() {
|
||||
}
|
||||
|
||||
// asyncRemove stops the server in peer mode.
|
||||
// It is called to stop the server because it has been removed
|
||||
// It is called to stop the server internally when it has been removed
|
||||
// from the cluster.
|
||||
// The function triggers the stop action first to notice server that it
|
||||
// should not continue, and wait for its stop in separate goroutine because
|
||||
// the caller should also exit.
|
||||
func (s *PeerServer) asyncRemove() {
|
||||
s.Lock()
|
||||
if !s.started {
|
||||
|
Loading…
x
Reference in New Issue
Block a user