fix attribute error

This commit is contained in:
Jack Robison 2020-06-04 09:30:42 -04:00
parent ddae84abb3
commit 1beb13dd80
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -284,12 +284,13 @@ class Network:
async def subscribe_address(self, address, *addresses):
addresses = list((address, ) + addresses)
server_addr_and_port = self.client.server_address_and_port # on disconnect client will be None
try:
return await self.rpc('blockchain.address.subscribe', addresses, True)
except asyncio.TimeoutError:
log.warning(
"timed out subscribing to addresses from %s:%i",
*self.client.server_address_and_port
*server_addr_and_port
)
# abort and cancel, we can't lose a subscription, it will happen again on reconnect
if self.client: