You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If discord is closed while discord ipc is connected, DiscordIPC.isConnected() will still return true but setActivity() will fail and log the message with the following code. Users have no way of knowing if setActivity() failed or not. Instead of just printing the error, this should throw and let users handle the error.
Catch the error, stop the connection, and throw the error up. This stops the connection properly and also lets users handle the error. This also allows users to have custom logging methods instead of just printStackTrace.
If discord is closed while discord ipc is connected,
DiscordIPC.isConnected()
will still return true butsetActivity()
will fail and log the message with the following code. Users have no way of knowing ifsetActivity()
failed or not. Instead of just printing the error, this should throw and let users handle the error.discord-ipc/src/main/java/meteordevelopment/discordipc/connection/UnixConnection.java
Lines 80 to 87 in f96ea7f
discord-ipc/src/main/java/meteordevelopment/discordipc/connection/WinConnection.java
Lines 26 to 33 in f96ea7f
Potential Fix
Catch the error, stop the connection, and throw the error up. This stops the connection properly and also lets users handle the error. This also allows users to have custom logging methods instead of just
printStackTrace
.The text was updated successfully, but these errors were encountered: