Add timeout error handling for connections
Merge branch 'feature/add-timeouts'