Skip to content

Commit

Permalink
save LongPollBot#ts when calling LongPollBot#initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
yvasyliev committed Sep 20, 2023
1 parent fe62030 commit 98884a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/api/longpoll/bots/LongPollBot.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public abstract class LongPollBot extends VkBot {
/**
* Latest received event.
*/
private int ts;
private Integer ts;

/**
* Whether infinite loop should be continued.
Expand Down Expand Up @@ -97,7 +97,9 @@ public void initialize() throws VkApiException {

server = longPollServer.get("server").getAsString();
key = longPollServer.get("key").getAsString();
ts = longPollServer.get("ts").getAsInt();
if (ts == null) {
ts = longPollServer.get("ts").getAsInt();
}
}

/**
Expand Down

0 comments on commit 98884a5

Please sign in to comment.