mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
p2p: document that RemovePeer blocks
This commit is contained in:
parent
df6ae09307
commit
a132830195
1 changed files with 3 additions and 0 deletions
|
|
@ -326,6 +326,9 @@ func (srv *Server) AddPeer(node *enode.Node) {
|
|||
|
||||
// RemovePeer removes a node from the static node set. It also disconnects from the given
|
||||
// node if it is currently connected as a peer.
|
||||
//
|
||||
// This method blocks until all protocols have exited and the peer is removed. Do not use
|
||||
// RemovePeer in protocol implementations, call Disconnect on the Peer instead.
|
||||
func (srv *Server) RemovePeer(node *enode.Node) {
|
||||
var (
|
||||
ch chan *PeerEvent
|
||||
|
|
|
|||
Loading…
Reference in a new issue