Eilon / MauiHybridWebView

MIT License
216 stars 48 forks source link

Fix possible hang in Proxy code for Android #51

Open Eilon opened 8 months ago

Eilon commented 8 months ago

In #43 a new proxy feature was introduced. Some of the code does sync-over-async, and calls .Wait() to block the async call. Unfortunately on iOS/MacCat this seems to hang 100% of the time. On Android there is similar code but doesn't seem to hang (but presumably it could).

We need to investigate a pattern to avoid the calls to .Wait() by finding a proper way to do async on iOS/MacCat/Android for these calls.

Example problematic call: https://github.com/Eilon/MauiHybridWebView/pull/43/files#diff-7580ae2f86a455f984e4ba3b09acf21b36bd79c70efa55d467f2df93a6c6f136R54

Eilon commented 8 months ago

The PR has fixes for iOS and MacCat now! But Android still calls .Wait(). Though no hang is currently known, it's something we need to address eventually.