Skip to content

Commit

Permalink
Merge pull request #336 from pipermerriam/piper/handle-timeout-in-exp…
Browse files Browse the repository at this point in the history
…lorer

Handle timeout in explorer during bond
  • Loading branch information
pipermerriam committed Dec 19, 2020
2 parents 9cefff7 + fd95845 commit 5738cd8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ddht/v5_1/explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ async def _bond_then_send(self, enr: ENRAPI,) -> None:
if enr.node_id == self._network.local_node_id:
did_bond = True
else:
did_bond = await self._network.bond(enr.node_id)
try:
did_bond = await self._network.bond(enr.node_id)
except (trio.TooSlowError, MissingEndpointFields):
return

if did_bond:
try:
Expand Down

0 comments on commit 5738cd8

Please sign in to comment.