Issue #25940: Merge ETIMEDOUT fix from 3.4 into 3.5