wb2osz / direwolf

Dire Wolf is a software "soundcard" AX.25 packet modem/TNC and APRS encoder/decoder. It can be used stand-alone to observe APRS traffic, as a tracker, digipeater, APRStt gateway, or Internet Gateway (IGate). For more information, look at the bottom 1/4 of this page and in https://github.com/wb2osz/direwolf/blob/dev/doc/README.md
GNU General Public License v2.0
1.56k stars 305 forks source link

Add retry to Hamlib rig_open call #484

Closed bjpetit closed 1 year ago

bjpetit commented 1 year ago

I've seen a few instances where the rigctld process will have started, but the socket isn't open yet. In my systemd setup, which ensures rigctld is started before direwolf starts, direwolf can start and try to call rig_open and get a connection refused error. If the rig_open is tried a few seconds later, the connection opens just fine. This change adds a retry loop which tries up to 5 times to run rig_open. If the call fails the 5 time, direwolf will exit.

wb2osz commented 1 year ago

Thank you for diagnosing this problem and providing a solution.