4 ms·
The problem with doing that, is that the standard TCP timeout is 60 seconds. All of a sudden, you are beset with 60-second hangs.
by ChrisMarshallNY 9mo ago
The problem with doing that, is that the standard TCP timeout is 60 seconds.
All of a sudden, you are beset with 60-second hangs.
- xnorswap 9mo agoYou just gave me flashbacks of mistyping a folder share name on windows and having the whole PC lock up for a minute or two.
- embedding-shape 9mo agoIf the computer doesn't have any online network connection, shouldn't it outright error? I understand that the timeout sucks when your network is not connected to the internet but still alive, then that's an issue, but if there is no connection at all, why would the timeouts matter?
- moduspol 9mo agoIt wouldn't be able to open a TCP connection without knowing what IP address / interface to use. You're right--it should outright error. You should only see timeouts like that if you were dropping the packets from some middleware or middlebox, but your client still had a valid IP address.
- deleted 9mo ago[deleted]
- lapcat 9mo ago> All of a sudden, you are beset with 60-second hangs. No, that's not how it works. Frankly, I'm astonished to see this claim here.
- ChrisMarshallNY 9mo agoDepends. I have a couple of apps on my computer that do exactly that. I am looking forward to learning how it does work...
- lapcat 9mo ago> I am looking forward to learning how it does work... It's basic sockets. If you call connect() when the internet is disabled, the errno is ENETUNREACH. The higher-level API are built on sockets. If any apps are misbehaving, they're simply badly coded.
- ChrisMarshallNY 9mo ago> It's basic sockets. Yup. I've done a bit of that stuff, in my time. > If any apps are misbehaving, they're simply badly coded. Plenty of that stuff, going around. Might want to ease back on the "instant insult" thing. Not a good look.
- lapcat 9mo ago> Yup. I've done a bit of that stuff, in my time. So are you willing to admit now that "the standard TCP timeout" was a misdiagnosis of your problem? You appeared to be projecting a personal problem with some unnamed badly coded apps onto everyone, as if it were inevitable, but the original commenter who said they turned off WiFi obviously does not experience this problem, and neither do I for that matter.
- ChrisMarshallNY 9mo ago[flagged]
- direwolf20 9mo agoI don't think you can get ENETUNREACH from recv though. If the request was sent, it'll time out.
- lapcat 9mo agoIt can cause problems to flip off the internet when you already have open connections, though there are also API to detect changes in network availability. But I don't see that as a significant problem for "I turn off my WiFi now to do performance-sensitive work". First turn off WiFi, then launch the app you need, in that order. Problem solved.
- pixl97 9mo agoThe problem with this is some apps do incredibly stupid things. Now I'm not saying the operating system itself, but I had some ide screw off and go into long pause mode when my laptop was in airplane mode.
- lapcat 9mo agoI'm sure there are stupid apps out there, but "the standard TCP timeout" was a misdiagnosis of the problem.
- ChrisMarshallNY 9mo agoJust a wrap-up. It was a badly-written comment. I meant some apps (and background tasks) on my computer hang. Most deal with it, but a surprising number don’t. I gave up on sniffing with Terminal and other tools, trying to figure out which ones. I have a number of dev tools installed on my computer, and a lot of those have a … casual … approach to quality. I have no issue admitting fault (I do it way too often), but I don’t really dig rewarding boorish behavior, so I just figured I’d leave it alone.