Closed Toldoven closed 1 year ago
So for your question, in my own projects, I've handled automatic reconnection by calling something like ipc.reconnect().is_ok()
and continuing if false. Could be helpful here.
However you raise a good point regarding the connected
attribute, I can't remember why I left it there without implementing it. I'll look into giving it a purpose/replacing it with something to the same effect.
Trying to implement automatic reconnection.
First I check if user enabled rich presence, and if it's disabled, I want to check if the client is open, and then close it. Then if it is enabled, I want to start the client, otherwise continue the loop.
I noticed that there is the
connected
field on theDiscordIpcClient
struct, but it was private. Then I tried to make it public, but it just seams that the functionality is just not implemented yet.Is there a way to check if the client is connected, or maybe a better way to do what I'm trying to do?