more exception handling for socket.timeout in worker_loop