HomePhabricator

Remove network_event_loop instance in close()

Description

Remove network_event_loop instance in close()

Summary:

The asyncio.new_event_loop() instance is now removed from the NetworkThread
class during shutdown. This enables a NetworkThread instance to be restarted
after being closed. The current NetworkThread class guards against an existing
new_event_loop during initialization.

This is a backport of Core PR17288 [1/7]
https://github.com/bitcoin/bitcoin/pull/17288/commits/ede8b7608e115364b5bb12e7f39d662145733de6

Test Plan: ninja && ninja check-functional

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8241

Details

Provenance
JamesC <james.chiangwu@gmail.com>Authored on Nov 3 2020, 12:54
PiRKCommitted on Nov 3 2020, 12:54
abc-botPushed on Nov 3 2020, 13:00
Reviewer
Restricted Owners Package
Differential Revision
D8241: Remove network_event_loop instance in close()
Parents
rABC84f236841820: added asserts to check m_addr_known when it's used
Branches
Unknown
Tags
Unknown