Originally created by: kristofferR
After a network change (Wi-Fi switch, VPN, sleep), WebKit keeps sending requests down a dead pooled connection for about 44 seconds. Carrier's reachability probe (probeFacebook, lib/stuck-worker.ts:12-29) makes a single same-host request, so it reports "offline" for that whole window and recovery waits.
Race the existing probe against a no-cors request to a second Facebook host (fMess uses https://m.facebook.com/favicon.ico, 19-recover.js:89-102), which gets a fresh connection. Either succeeding means reachable.
Unit-test the race (first wins, both fail, one hangs). Live: switch Wi-Fi networks with Carrier open and measure time to recovery before and after.
Part of [#349].
Originally posted by: kristofferR
Fixed in [#375]: the reachability probe now races its same-host request with a fresh connection to
m.facebook.com. Tested live by blocking only the address of Carrier's pooledwww.facebook.comconnection on the router: the same-host request hung until it timed out, whilem.facebook.comanswered in 51 ms, so the probe correctly reported Facebook reachable.It is on
mainand ships in the next release.Related
Tickets:
#375Ticket changed by: kristofferR