Skip to content

Error handling for Network Unreachable #72

Closed
@shader

Description

@shader

If the network goes down for some reason, zbeacon produces the following error message:

Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib64/python2.7/site-packages/pyre/zbeacon.py", line 204, in __init__
    self.run()
  File "/usr/lib64/python2.7/site-packages/pyre/zbeacon.py", line 398, in run
    self.send()
  File "/usr/lib64/python2.7/site-packages/pyre/zbeacon.py", line 338, in send
    self._udp_sock.sendto(self.transmit, (str(self.announce_address), self._port))
error: [Errno 101] Network is unreachable

What is the proper way to provide error handling for this situation? I'd like to implement something like sleep + retry, but I could imagine others wanting to provide a different handler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions