Skip to content

Commit

Permalink
fix: handling cases when http connection is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Desu Sai Venkat committed Jul 20, 2023
1 parent d7e2ed9 commit 21ca220
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ Result sendNetworkRequest(@Nullable String requestPayload, @NonNull String reque

try {
HttpURLConnection httpConnection = updateHttpConnection(requestURL, requestMethod, requestPayload, isDMTRequest, isGzipAvailableForApi);
if (httpConnection == null) {
return new Result(NetworkResponses.ERROR, -1, null, "Http Connection is Null");
}
synchronized (MessageUploadLock.REQUEST_LOCK) {
httpConnection.connect();
}
Expand Down

0 comments on commit 21ca220

Please sign in to comment.