Skip to content
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

Improve handling of p2pNetworkAndWalletReady #4479

Conversation

chimp1984
Copy link
Contributor

The p2pNetworkAndWalletReady MonadicBinding might be removed from GC
if its a local variable. I observed that in BisqSetup with a similar
setup. It might be an implementation weakness in MonadicBinding
(usage of weak references?). A tester reported that he does not see any
result, which might be cause that the service never gets the
onP2pNetworkAndWalletReady triggered if the MonadicBinding is not there
anymore.
By removing the listener we need at shutdown we need it anyway as class
field (so codacy does not complain anymore). As well added a check if
all is already complete to skip the MonadicBinding at all
(not expected case in onAllServicesInitialized).

The p2pNetworkAndWalletReady MonadicBinding might be removed from GC
if its a local variable. I observed that in BisqSetup with a similar
setup. It might be an implementation weakness in MonadicBinding
(usage of weak references?). A tester reported that he does not see any
result, which might be cause that the service never gets the
onP2pNetworkAndWalletReady triggered if the MonadicBinding is not there
anymore.
By removing the listener we need at shutdown we need it anyway as class
field (so codacy does not complain anymore). As well added a check if
all is already complete to skip the MonadicBinding at all
(not expected case in onAllServicesInitialized).
Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Definitely uglier, but let's hope it actually works rather than having intermittent failures.

@sqrrm sqrrm merged commit d152f88 into bisq-network:master Sep 6, 2020
@chimp1984 chimp1984 deleted the improve-xmr-proof-p2pNetworkAndWalletReady-handling branch September 7, 2020 03:11
@ripcurlx ripcurlx added this to the v1.3.9 milestone Sep 7, 2020
@chimp1984
Copy link
Contributor Author

@ripcurlx Should be 1.3.8 not 1.3.9

@ripcurlx ripcurlx modified the milestones: v1.3.9, v1.3.8 Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants