Sleeping the OS causes TCP connection close

Today while testing the Win version of my app, I was able to do it on real hardware rather than in a VM. The thing about a VM is that you cannot sleep it. On the other hand, you can sleep a real machine, and when I did this today, it immediately caused a TCP connection to be closed, one that I had open within my app, connecting an HTMLViewer to the rest of the app via a websocket. This is bad as the app opens this connection when the it starts up, and it is supposed to stay open until the app quits.

The app running under macOS does not experience this issue; the socket stays open over the machine sleeping.

Is this expected behaviour or likely to be a bug?

Running 2023r1.1 under Catalina, testing with Win-10 in a VirtualBox VM, and Win-11 on a real box.

On your mac: are you using Power Nap?
Does windows offers something like that?

I was, so I tested again under macOS with it turned off - and it still worked fine. Of course, it may be that one has to reboot to put the new setting into effect, but the Energy Saver Control Panel didn’t indicate that.

I have no idea. If that turns out to be necessary, then I’d need it for Linux too.