p2p: use correct context error

This commit is contained in:
William Banfield
2022-06-30 16:50:52 -04:00
parent 5c26db733b
commit 19afbf7fd2

View File

@@ -315,7 +315,7 @@ func (c *mConnConnection) Handshake(
select {
case <-handshakeCtx.Done():
_ = c.Close()
return types.NodeInfo{}, nil, ctx.Err()
return types.NodeInfo{}, nil, handshakeCtx.Err()
case err := <-errCh:
if err != nil {