mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-25 01:14:28 +00:00
handshakeCtx is the internal context carrying the timeout. Its error should be used for the error return.
(cherry picked from commit 921530c352)
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
This commit is contained in:
co-authored by
William Banfield
parent
68691935c8
commit
171985df2a
@@ -315,7 +315,7 @@ func (c *mConnConnection) Handshake(
|
|||||||
select {
|
select {
|
||||||
case <-handshakeCtx.Done():
|
case <-handshakeCtx.Done():
|
||||||
_ = c.Close()
|
_ = c.Close()
|
||||||
return types.NodeInfo{}, nil, ctx.Err()
|
return types.NodeInfo{}, nil, handshakeCtx.Err()
|
||||||
|
|
||||||
case err := <-errCh:
|
case err := <-errCh:
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user