File tree Expand file tree Collapse file tree
src/main/java/me/Logicism/JavaHordeBridge/runnables Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,8 +94,6 @@ public void run() {
9494 JSONObject popObject = new JSONObject (BrowserClient .requestToString (bd .getResponse ()));
9595 if (bd .getResponseCode () == 200 ) {
9696 if (!popObject .isNull ("id" )) {
97- failedRequestsCount = 0 ;
98-
9997 currentId = popObject .getString ("id" );
10098
10199 JSONObject payloadObject = popObject .getJSONObject ("payload" );
@@ -130,8 +128,12 @@ public void run() {
130128
131129 if (bd .getResponseCode () == 200 ) {
132130 if (generation == null ) {
131+ failedRequestsCount ++;
132+
133133 bridge .getLogger ().error ("Aborting generation " + currentId + " due to exceeded 5 retry counts" );
134134 } else {
135+ failedRequestsCount = 0 ;
136+
135137 bridge .getLogger ().info ("Submitted generation " + currentId + " for the reward of " + rewardObject .getDouble ("reward" ) + " kudos" );
136138 }
137139 } else if (bd .getResponseCode () == 404 ) {
You can’t perform that action at this time.
0 commit comments