Use asyncio.gather to propogate exceptions

This commit is contained in:
Neil Booth 2018-07-25 10:14:05 +08:00
parent 918592fbff
commit fa84b0f54b
2 changed files with 2 additions and 2 deletions

View File

@ -168,7 +168,7 @@ class MemPool(object):
(hashes, all_hashes, touched))
for hashes in chunks(new_hashes, 2000)]
if jobs:
await asyncio.wait(jobs)
await asyncio.gather(*jobs)
tx_map = {}
utxo_map = {}
for job in jobs:

View File

@ -281,7 +281,7 @@ class PeerManager(object):
self._send_server_features(session, peer, timeout),
self._send_peers_subscribe(session, peer, timeout)
)]
await asyncio.wait(jobs)
await asyncio.gather(*jobs)
async def _send_headers_subscribe(self, session, peer, timeout, ptuple):
request = session.send_request('blockchain.headers.subscribe',