good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit a981b60c authored by sixdays's avatar sixdays Committed by GitHub
Browse files

eth/downloader: don't use defer for unlock before return (#21227)


Co-authored-by: default avatarlinjing <linjingjing@baidu.com>
parent 9371b2f7
No related branches found
No related tags found
No related merge requests found
......@@ -421,7 +421,7 @@ func (ps *peerSet) Unregister(id string) error {
ps.lock.Lock()
p, ok := ps.peers[id]
if !ok {
defer ps.lock.Unlock()
ps.lock.Unlock()
return errNotRegistered
}
delete(ps.peers, id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment