craigerl / ygate

Turn your Yaesu APRS radio into an igate. By KM6LYW.
28 stars 9 forks source link

Becomes unresponsive when socket is closed #3

Open ThomasBarris opened 4 years ago

ThomasBarris commented 4 years ago
Exception in thread Thread-202:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 1073, in run
    self.function(*self.args, **self.kwargs)
  File "./ygate.py", line 47, in send_my_position
    sock.send(position_string)
error: [Errno 32] Broken pipe

If the socket is closed for any reason, the program throws the above error repeatedly and becomes unresponsive. _send_myposition should catch closed sockets and re-open it.

craigerl commented 3 years ago

understood - I'll add a closed-socket detection, thanks! i think i can do this with "select()"... or just detect a zero-byte-read.

craigerl commented 6 months ago

fixed in latest bersion