Skip to content

Commit

Permalink
Fix infinite loop in dashboard server (#1731)
Browse files Browse the repository at this point in the history
The bug was introduced last time I refactored the code using JDK19 and
virtual threads. The infinite loop can happen when the server tries to
sync comments data of one issue from Github and if the number of pages
is greater than 1. It starves the scheduler thread, preventing the
server handles more events and syncing tasks, resulting in the delay of
syncing until a restart.
  • Loading branch information
coeuvre authored Aug 24, 2023
1 parent 9f3e183 commit 1cda709
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public void syncIssueComments(String owner, String repo, int issueNumber) {
if (node.size() < PER_PAGE) {
break;
}
page += 1;
} catch (IOException e) {
log.error("Failed to sync issue comments: " + e.getMessage(), e);
return;
Expand Down

0 comments on commit 1cda709

Please sign in to comment.