Backport zhaofengli/attic#246 to work around a hyper connection pool race condition that causes spurious "connection closed before message completed" errors during cache uploads in CI.