[Cashtab] Handle port disconnects in extension
Summary:
T3370
Handle port disconnect event to prevent 'port disconnected' error
In prod use, we are seeing the connection between a web page and the cashtab extension disconnect and fail to reconnect. I have not been able to reliably repeat it, but it tends to happen after several extension requests, or after a period of inactivity followed by additional message requests.
In testing, I have been unable to repeat the issue on a local extension if the event is handled. I can't say if this is actually a fix, but I also can't really test the problem if this prevents me from repeating the issue. Getting this change published and seeing if the bug recurs would be useful info for ironing this out.
Test Plan: npm run extension completes; observe no real change to the code
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14946