Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Don't manually poll the ioservice after stopping capabilities #5533

Merged
merged 2 commits into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
- Fixed: [#5502](https://github.com/ethereum/aleth/pull/5502) Fix Discovery terminating prematurely because of race condition.
- Fixed: [#5452](https://github.com/ethereum/aleth/pull/5452) Correctly handle Discovery messages when the peer changes public key.
- Fixed: [#5519](https://github.com/ethereum/aleth/pull/5519) Correctly handle Discovery messages with known public key but unknown endpoint.
- Fixed: [#5523](https://github.com/ethereum/aleth/pull/5523) [#5533](https://github.com/ethereum/aleth/pull/5533) Fix syncing terminating prematurely because of race condition.

[1.6.0]: https://github.com/ethereum/aleth/compare/v1.6.0-alpha.1...master
5 changes: 2 additions & 3 deletions libp2p/Host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,9 @@ void Host::doneWorking()
while (m_accepting)
m_ioService.poll();

// (eth: stops syncing or block / tx broadcast). Poll the io service so we can process
// capability cancellations
// (eth: stops syncing or block / tx broadcast). Capabilities will be cancelled when ioservice
// is polled on pending handshake / peer disconnect
stopCapabilities();
m_ioService.poll();

// disconnect pending handshake, before peers, as a handshake may create a peer
for (unsigned n = 0;; n = 0)
Expand Down