-
Notifications
You must be signed in to change notification settings - Fork 4
Feature/bidirec channel #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… fetch; make token prefetch properly asynchronous
jexh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it looks good.
| // thread since it makes blocking calls. | ||
| // presented on any particular URL to implement the pinning. | ||
| public class ApproovHttpClientPlugin implements FlutterPlugin, MethodCallHandler { | ||
| // CertificatePrefetcher is a Runnable that fetches the certificates for a given URL. This allows the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: CertificatePrefetcher -> CertificateFetcher
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
|
||
| // setup a Completer for the transaction ID we are going to use | ||
| Completer<dynamic> completer = new Completer<dynamic>(); | ||
| String transactionID = ApproovService.transactionID.toString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is thread safe in flutter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because Dart is single threaded in each isolate. Just uses co-operative scheduling across "awaits".
|
So can we go ahead and merge this now? |
ivolz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets go.
New attempt at cert prefetching with a completely new communication channel implementation. Now uses async callbacks rather than a background thread for the channel as this seemed to lead to very poor performance.