Skip to content

Commit

Permalink
[Fix] update response code for try connection (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
JNSimba authored Sep 14, 2024
1 parent 62360c7 commit d7323aa
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ public static boolean tryHttpConnection(String host) {
int responseCode = connection.getResponseCode();
String responseMessage = connection.getResponseMessage();
connection.disconnect();
if (200 == responseCode) {
if (responseCode < 500) {
// code greater than 500 means a server-side exception.
return true;
}
LOG.warn(
Expand Down

0 comments on commit d7323aa

Please sign in to comment.