aboutsummaryrefslogtreecommitdiffstats
path: root/peer.go
diff options
context:
space:
mode:
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/peer.go b/peer.go
index 60f2de711..6853a949d 100644
--- a/peer.go
+++ b/peer.go
@@ -2,7 +2,6 @@ package eth
import (
"bytes"
- "container/list"
"fmt"
"github.com/ethereum/eth-go/ethchain"
"github.com/ethereum/eth-go/ethutil"
@@ -523,13 +522,7 @@ func (p *Peer) Stop() {
}
// Pre-emptively remove the peer; don't wait for reaping. We already know it's dead if we are here
- p.ethereum.peerMut.Lock()
- defer p.ethereum.peerMut.Unlock()
- eachPeer(p.ethereum.peers, func(peer *Peer, e *list.Element) {
- if peer == p {
- p.ethereum.peers.Remove(e)
- }
- })
+ p.ethereum.RemovePeer(p)
}
func (p *Peer) pushHandshake() error {