Client gets stuck in timeout loop when server takes too long to respond, and only breaks out when the server is restarted.