Skip to content

Commit

Permalink
Keep the check for empty response from the server
Browse files Browse the repository at this point in the history
  • Loading branch information
slacmshankar committed Apr 25, 2024
1 parent a4ed57f commit a911c1f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ public final GenMsgIterator getDataForPVs(
+ getURL);
return null;
}
return new InputStreamBackedGenMsg(response.body());
InputStream is = response.body();
if (is.available() <= 0) {
logger.warning("Empty response from server when fetching data from " + getURL);
return null;
}
return new InputStreamBackedGenMsg(is);

} catch (Exception ex) {
logger.log(Level.SEVERE, "Exception fetching data from URL " + getURL, ex);
Expand Down

0 comments on commit a911c1f

Please sign in to comment.