HomePhabricator

[Cashtab] Handle port disconnects in extension

Description

[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

Details

Provenance
bytesofmanAuthored on Dec 7 2023, 13:12
bytesofmanPushed on Dec 7 2023, 19:36
Reviewer
Restricted Project
Differential Revision
D14946: [Cashtab] Handle port disconnects in extension
Parents
rABCbc8dfeb0fd66: [ecash-coinselect] Patch bug where returned outputs could be non-integer
Branches
Unknown
Tags
Unknown