This is a problem that I can repro on one iPhone 12 Pro Max here, and is reported by a few users in the field, but doesn't repro on any other devices here and I can't find a pattern to it (except all user reports so far are on iOS 15). Depending on how widespread it is, it could be pretty bad.
Basically, if you write a simple socket-based app to (in my case) connect to an HTTP server, send a GET request for a very large file, read some bytes of the response, and then close the socket before the download completes, then after one or more iterations of this sequence, it stops working. Specifically, after it "breaks", then subsequently trying to connect a socket to any host at all fails by timing out. It remains "broken" even after killing and relaunching my app. And (here's the scary part) BSD sockets are now "broken" for all other apps on the device and remain broken until you reboot the device. It’s as if the BSD network stack in the OS kernel has fallen over. Really.
Of course I'm preparing to submit an FB including a minimalist sample app that demonstrates the issue. But it seems like a rare occurrence that luckily happens to affect my own phone, so I wanted to see if this sounds familiar to anyone else.
I'm thinking there's nothing an app should be able to do within its own process/sandbox that should affect the behavior of system APIs for other apps and require a reboot to fix. So, yeah.
I know, I know. Of course right now I'm scrambling to rewrite this whole thing using the modern Network framework. Just never got around to it before because the old socket-based code has been working great for over 10 years. Until this week, that is.
Hi.... We are using BSD Socket code too (For last 9 years) and have recently had some reports (So far only on iPhone 13 and iOS15.x) of sockets not connecting. However it is only a problem when connected on WAN. If user switches to WIFI then everything is OK.
From your experience with the problem does changing from WAN to Wifi make any difference?
i'm not sure if what we car seeing could be this issue or something else.