Skip to content

Commit

Permalink
set null data when token expired
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksei Levanov committed Oct 24, 2024
1 parent 714c5b2 commit 36dc9f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ private void handleConnectReply(Protocol.Reply reply) {
this.handleConnectionError(new ReplyError(reply.getError().getCode(), reply.getError().getMessage(), reply.getError().getTemporary()));
if (reply.getError().getCode() == 109) { // Token expired.
this.refreshRequired = true;
this.data = null;
this.ws.close(NORMAL_CLOSURE_STATUS, "");
} else if (reply.getError().getTemporary()) {
this.ws.close(NORMAL_CLOSURE_STATUS, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ void subscribeError(ReplyError err) {
this.listener.onError(this, new SubscriptionErrorEvent(new SubscriptionSubscribeError(err)));
if (err.getCode() == 109) { // Token expired.
this.token = "";
this.data = null;
this.scheduleResubscribe();
} if (err.isTemporary()) {
this.scheduleResubscribe();
Expand Down

0 comments on commit 36dc9f6

Please sign in to comment.