Commit 7ba9fe4d authored by obscuren's avatar obscuren

Reset peer during download on disc

parent 25d16f35
...@@ -412,6 +412,12 @@ func (p *Peer) HandleInbound() { ...@@ -412,6 +412,12 @@ func (p *Peer) HandleInbound() {
//} //}
case wire.MsgDiscTy: case wire.MsgDiscTy:
blockPool := p.ethereum.blockPool
if blockPool.peer == p {
blockPool.peer = nil
blockPool.td = ethutil.Big0
}
p.Stop() p.Stop()
peerlogger.Infoln("Disconnect peer: ", DiscReason(msg.Data.Get(0).Uint())) peerlogger.Infoln("Disconnect peer: ", DiscReason(msg.Data.Get(0).Uint()))
case wire.MsgPingTy: case wire.MsgPingTy:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment