Skip to content

Commit

Permalink
Fix for status code check
Browse files Browse the repository at this point in the history
  • Loading branch information
lovesh-ap committed Dec 16, 2024
1 parent c923894 commit 413c6b7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ public void tryToEstablishApplicationEndpoint(HttpRequest request) {
for (Map.Entry<String, String> endpoint : endpoints.entrySet()) {
try {
ReadResult result = httpClient.execute(request, endpoint.getValue(), null, true);
if(result.getStatusCode() >= 200 && result.getStatusCode() <= 500) {
int statusCode = result.getStatusCode();
if ((statusCode >= 200 && statusCode < 300) || (statusCode >= 400 && statusCode < 500)) {
ServerConnectionConfiguration serverConnectionConfiguration = new ServerConnectionConfiguration(serverPort, endpoint.getKey(), endpoint.getValue(), true);
AppServerInfo appServerInfo = AppServerInfoHelper.getAppServerInfo();
appServerInfo.getConnectionConfiguration().put(serverPort, serverConnectionConfiguration);
Expand Down

0 comments on commit 413c6b7

Please sign in to comment.