How to persist a websocket connection using ControlChannelTrigger in the background?
Hello, I followed https://learn.microsoft.com/en-us/windows/uwp/networking/network-communications-in-the-background#controlchanneltrigger-with-websockets and create an out-of-process background task using ControlChannelTrigger with MessageWebSocket.
Everything works fine in the foreground, however, if I close the app window, the websocket connection will be killed and no longer receive any message.
I re-opened my app but found registered BackgroundTasks didn't exist any more and I had to register them again.
How can I persist a websocket connection using ControlChannelTrigger in the background?
Thanks!