Sleeping the OS causes TCP connection close

Enable this in Windows 10 (surely there is something like it in other versions)


or just see if the connection closed & reopen it when the app is revived after sleep

sometimes reopening crashes Norman and then…then… :bangbang:

I never crash :stuck_out_tongue:

1 Like

okay, Norman, it can be happened that it crashes sometimes when reopening. I guess this you can better understand. You may never crash by self. Sorry that I wrote it so complex. This crashed when you where reading it :slight_smile:

I, me, Norman, never crashes

Software is a VERY different story :stuck_out_tongue:

English is twisty that way
And easy to jest with because of that

That’s exactly what I wanted to describe above. But I guess: you understood what I wanted to say. But it was my fault. I could have written: sometimes it crashes the running program Norman. But…I was tooooo lacy

I’ll just bite my tongue about being


1 Like

the result I wanted: crashing until biting the tongue…

TCP Keep Alive.

Edit: I would advise against trying to ensure the impossible and instead build a solution that can try to reconnect. If any hardware between the two devices has a fit or goes offline, the connection is broken.

Dunno if setting that alone will force Windows to keep it alive as it seems to be part of power management to turn it off on sleep

S’all I know… It’s meant to tickle TCP connections at least every two hours. I would imagine it is supported by most major PC vendors, but as I don’t have a PC.

Even then, I’d still advise against building your application expecting the TCP connection to remain alive. For short bursts, sure.

Agreed that assuming the connection will persist for ever is a bad assumption
They shut down for all kinds of reasons unrelated to the app quitting

Like who just tripped over that cable ? Shut the router down ? etc

1 Like