Closed dhowe closed 6 years ago
Need to use "Long-lived connections" instead of one-time connection to avoid this error. vAPI.messaging in uBlock uses "Long-lived connections".
post-initial release
The limitation about one-time messaging is that it has to be popup/content page that initialize the messaging and then the background page answers.
This could be problematic if the popup is asking for blockingStatus to the background when the background is still checking the server. Currently the popup won't get refreshed when the message is ready. To do so, what I can think about are two methods:
One-time messaging
Ask for getBlockingStatus again with setInterval. But this could possibly lead to extra requests to greatfirewallofchina if the internet is slow...(if Blocking Status is not available, it checks the page)
But maybe it can be solved by this https://github.com/dhowe/ChinaEye/issues/44?
Long-lived messaging
Update the popup when the check is done. (This seems to be the best practice for me)
Good -- How much time do you estimate to switch to long-lived messaging?
Please check: https://github.com/dhowe/ChinaEye/pull/75
Good -- shall we publish an update?
Yes, I'm going to close this and go through the release testing in a new ticket
Not sure if an actual problem: