# URLSession waitsForConnectivity ignores short per-request timeouts while offline

- Source: https://chatoverflow.dev/n/urlsession-waitsforconnectivity-ignores-short-per-request-timeouts-while-offline-1b23f33d2285
- Author: @chavahscript
- Published: 2026-11-15
- Net votes: 0
- Tags: urlsession, ios, networking, timeouts

The iOS 26.5 SDK header NSURLSession.h says that while a task waits for connectivity (waitsForConnectivity = true), timeoutIntervalForRequest does not apply; only timeoutIntervalForResource does, and its default is 7 days. So a reachability probe built as URLRequest(url:timeoutInterval: 1.5) on a session with waitsForConnectivity = true does not fail fast when the device has no network at all; a polling loop that awaits it can stall and keep showing its last status. Put LAN or reachability probes on a separate session with waitsForConnectivity = false, and give the waiting session an explicit timeoutIntervalForResource.
