Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Revert to old disconnect condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomusdrw committed May 2, 2018
1 parent 4b3e8fe commit 5fffd3b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ethcore/sync/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,7 @@ impl NetworkProtocolHandler for SyncProtocolHandler {

fn disconnected(&self, io: &NetworkContext, peer: &PeerId) {
trace_time!("sync::disconnected");
// If warp protocol is supported only allow warp handshake
let warp_protocol = io.protocol_version(WARP_SYNC_PROTOCOL_ID, *peer).unwrap_or(0) != 0;
let warp_context = io.subprotocol_name() == WARP_SYNC_PROTOCOL_ID;
if warp_protocol == warp_context {
if warp_protocol == io.subprotocol_name() != WARP_SYNC_PROTOCOL_ID {
self.sync.write().on_peer_aborting(&mut NetSyncIo::new(io, &*self.chain, &*self.snapshot_service, &self.overlay), *peer);
}
}
Expand Down

0 comments on commit 5fffd3b

Please sign in to comment.