mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
p2p: missing lock
This commit is contained in:
parent
7070891ade
commit
c0f4811879
1 changed files with 4 additions and 1 deletions
|
|
@ -191,10 +191,13 @@ func (c *meteredConn) encHandshakeDone(id enode.ID) {
|
|||
|
||||
// peerAdded is called after the connection passes the protocol handshake.
|
||||
func (c *meteredConn) peerAdded(info *PeerInfo) {
|
||||
c.lock.RLock()
|
||||
id := c.id
|
||||
c.lock.RUnlock()
|
||||
meteredPeerFeed.Send(MeteredPeerEvent{
|
||||
Type: PeerProtoHandshakeSucceeded,
|
||||
Addr: c.addr.String(),
|
||||
ID: c.id,
|
||||
ID: id,
|
||||
Info: info,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue