Skip to content

Commit 6a397b3

Browse files
Updates from review
1 parent 32a74ab commit 6a397b3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

android/src/main/java/com/criticalblue/approov_service_flutter_httpclient/ApproovHttpClientPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,17 @@ public void run() {
111111
// ensure it is done on the main thread
112112
resultMap.put("TransactionID", transactionID);
113113
resultMap.put("Certificates", hostCertificates);
114-
countDownLatch.countDown();
115114
if (handler != null)
116115
handler.post(() -> fgChannel.invokeMethod("response", resultMap));
117116
} catch (Exception e) {
118117
// send any exception back to the Flutter Dart layer using the handler to
119118
// ensure it is done on the main thread
120119
resultMap.put("TransactionID", transactionID);
121120
resultMap.put("Error", e.getLocalizedMessage());
122-
countDownLatch.countDown();
123121
if (handler != null)
124122
handler.post(() -> fgChannel.invokeMethod("response", resultMap));
123+
} finally {
124+
countDownLatch.countDown();
125125
}
126126
}
127127

lib/approov_service_flutter_httpclient.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,7 +1847,7 @@ class ApproovHttpClient implements HttpClient {
18471847
@override
18481848
Future<HttpClientRequest> open(String method, String host, int port, String path) async {
18491849
// obtain the delegate HttpClient to be used (with null meaning no connection should
1850-
// be forcdd) and then wrap the provided HttpClientRequest
1850+
// be forced) and then wrap the provided HttpClientRequest
18511851
Uri url = Uri(scheme: "https", host: host, port: port, path: path);
18521852
var delegateClient = await _getDelegateHttpClient(url);
18531853
if (delegateClient == null) delegateClient = _noConnectionClient;
@@ -1859,7 +1859,7 @@ class ApproovHttpClient implements HttpClient {
18591859
@override
18601860
Future<HttpClientRequest> openUrl(String method, Uri url) async {
18611861
// obtain the delegate HttpClient to be used (with null meaning no connection should
1862-
// be forcdd) and then wrap the provided HttpClientRequest
1862+
// be fored) and then wrap the provided HttpClientRequest
18631863
var delegateClient = await _getDelegateHttpClient(url);
18641864
if (delegateClient == null) delegateClient = _noConnectionClient;
18651865
return delegateClient.openUrl(method, url).then((request) {

0 commit comments

Comments
 (0)