mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-01 22:25:46 +01:00
@@ -1960,9 +1960,17 @@ public class PushServiceSocket {
|
||||
boolean doNotAddAuthenticationOrUnidentifiedAccessKey)
|
||||
throws NonSuccessfulResponseCodeException, PushNetworkException, MalformedResponseException
|
||||
{
|
||||
Response response = getServiceConnection(urlFragment, method, body, headers, unidentifiedAccessKey, doNotAddAuthenticationOrUnidentifiedAccessKey);
|
||||
responseCodeHandler.handle(response.code(), response.body());
|
||||
return validateServiceResponse(response);
|
||||
Response response = null;
|
||||
try {
|
||||
response = getServiceConnection(urlFragment, method, body, headers, unidentifiedAccessKey, doNotAddAuthenticationOrUnidentifiedAccessKey);
|
||||
responseCodeHandler.handle(response.code(), response.body());
|
||||
return validateServiceResponse(response);
|
||||
} catch (Exception e) {
|
||||
if (response != null && response.body() != null) {
|
||||
response.body().close();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
private Response validateServiceResponse(Response response)
|
||||
|
||||
Reference in New Issue
Block a user