socket: Move initialization of timeval structure into retry loop in socket_check_fd()

Depending on the platform, select() may modify the timeval structure to
indicate the amount left on the timer, so we reset the timeout before calling
select() again. Thanks to sctol for reporting.
1 file changed