mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 01:43:47 +00:00
p2p: trying to fix deadlock on discovery tests
This commit is contained in:
parent
0e55745d53
commit
411b9a9cdf
1 changed files with 3 additions and 2 deletions
|
|
@ -108,8 +108,9 @@ func (t *rlpx) close(err error) {
|
||||||
// Tell the remote end why we're disconnecting if possible.
|
// Tell the remote end why we're disconnecting if possible.
|
||||||
if t.rw != nil {
|
if t.rw != nil {
|
||||||
if r, ok := err.(DiscReason); ok && r != DiscNetworkError {
|
if r, ok := err.(DiscReason); ok && r != DiscNetworkError {
|
||||||
t.fd.SetWriteDeadline(time.Now().Add(discWriteTimeout))
|
if err2 := t.fd.SetWriteDeadline(time.Now().Add(discWriteTimeout)); err2 != nil {
|
||||||
SendItems(t.rw, discMsg, r)
|
SendItems(t.rw, discMsg, r)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
t.fd.Close()
|
t.fd.Close()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue