Bug #704
Correctly restart network listening threads when they die
Start date:
05/29/2015
Due date:
% Done:
0%
Estimated time:
Resolution:
Description
On accept() and other errors within the Listen threads (SeedLink and DataLink) the listening thread can die. When this occurs the socket is left open and bound. When a thread restart is attempted the bind() fails because it is already bound.
to fix:
a) InitServerSocket() should close the socket if any error is returned. This allows the assumption that if the socket is initialized/open it is also bound and ready for accept().
b) When restarting a server listening thread: check for an existing socket and skip initialization if present.
to avoid Listen thread dying on non-critical errors: check for non-critical error results (ECONNABORTED, EINTR and maybe EAGAIN) and continue to the next accept() without exiting.
History
#1 Updated by Chad Trabant over 9 years ago
- Project changed from orb2ringserver to ringserver