Skip to content

Commit

Permalink
fix (core): connection message task is not being cancelled when the i…
Browse files Browse the repository at this point in the history
…nstance is authenticated
  • Loading branch information
samfces committed Aug 30, 2022
1 parent 71e231d commit 7dd5326
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ public void call(Object... args) {
new Timer().schedule(new java.util.TimerTask() {
@Override
public void run() {
v4GuardCore.getInstance().getLogger().log(Level.WARNING,"This instance is not connected with your account. Connect it using this link: https://dashboard.v4guard.io/link/" + backendConnector.getAuthCode());
if(backendConnector.getSocketStatus().equals(SocketStatus.NOT_AUTHENTICATED)){
v4GuardCore.getInstance().getLogger().log(
Level.WARNING,
"This instance is not connected with your account. Connect it using this link: https://dashboard.v4guard.io/link/"
+ backendConnector.getAuthCode());
} else {
cancel();
}
}
}, 1000L, 60L*1000L);
} else if (backendConnector.getSocketStatus().equals(SocketStatus.PRE_AUTHENTICATED)) {
Expand Down

0 comments on commit 7dd5326

Please sign in to comment.