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

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/4479'>https://github.com/bisq-network/bisq/pull/4479</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Improve handling of p2pNetworkAndWalletReady</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4479/files#diff-9d3da3abc6c981c4b74bc829a8766cc0">core/src/main/java/bisq/core/trade/txproof/xmr/XmrTxProofService.java</a>
    (38)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/4479.patch'>https://github.com/bisq-network/bisq/pull/4479.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/4479.diff'>https://github.com/bisq-network/bisq/pull/4479.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/4479">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNU4GY26KW3ZZPNVIQDSEEY5LANCNFSM4QZEG4IA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNXBMORVQYI4MFBF5FTSEEY5LA5CNFSM4QZEG4IKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KKV2KQQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/4479",
"url": "https://github.com/bisq-network/bisq/pull/4479",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>