mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
return from peer loop if crypto fails, oops
This commit is contained in:
parent
7f12ac702f
commit
876fd8bd17
1 changed files with 1 additions and 0 deletions
|
|
@ -349,6 +349,7 @@ func (p *Peer) handleCryptoHandshake() (err error) {
|
||||||
// this bit handles the handshake and creates a secure communications channel with
|
// this bit handles the handshake and creates a secure communications channel with
|
||||||
if sessionToken, crw, err = crypto.NewSession(bufio.NewReader(p.conn), p.conn, p.PublicKey(), sessionToken, initiator); err != nil {
|
if sessionToken, crw, err = crypto.NewSession(bufio.NewReader(p.conn), p.conn, p.PublicKey(), sessionToken, initiator); err != nil {
|
||||||
p.Errorf("unable to setup secure session: %v", err)
|
p.Errorf("unable to setup secure session: %v", err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
err = fmt.Errorf("unrecognised crypto type %v", p.CryptoType)
|
err = fmt.Errorf("unrecognised crypto type %v", p.CryptoType)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue