Added client-side timeout. Tested together.