refactoring request and connection timeouts