<p></p>
<blockquote>
<p>Even with a graceful shutdown there should be enough time to deliver the messages.</p>
</blockquote>
<p>actually, before <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="579242410" data-permission-text="Title is private" data-url="https://github.com/bisq-network/bisq/issues/4047" data-hovercard-type="pull_request" data-hovercard-url="/bisq-network/bisq/pull/4047/hovercard" href="https://github.com/bisq-network/bisq/pull/4047">bisq-network/bisq#4047</a>, tor has been terminated before all messages have been flushed out. No RemoveOfferMsg, no CloseConnectionMsg. And, there is no central queue and there could be severe consequences to that. Here is the scenario:</p>
<ol>
<li>A critical message might be "queued" in a UserThread.runAfter(>0, connection.sendMessage(.))</li>
<li>Thus, the connection does not know about the message yet</li>
<li>The business logic triggering the UserThread.runAfter assumes it has been sent (and depending on the message, may also memorizes that information)</li>
</ol>
<p>Now, given, the client gets shut down before the message is sent, the business logic has no way of knowing that the message hasn't been sent (so no resend). Thus, we have a "lost" message.</p>
<blockquote>
<p>The message queued up are usually not much</p>
</blockquote>
<p>Give it enough time and trials and it will happen.</p>
<blockquote>
<p>At shutdown of headless nodes there is/was no graceful shutdown</p>
</blockquote>
<p>The issue we have been/are facing here is that the data store files got corrupted frequently. A graceful shutdown did help some. However, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="576403913" data-permission-text="Title is private" data-url="https://github.com/bisq-network/projects/issues/25" data-hovercard-type="issue" data-hovercard-url="/bisq-network/projects/issues/25/hovercard" href="https://github.com/bisq-network/projects/issues/25">#25</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="595721729" data-permission-text="Title is private" data-url="https://github.com/bisq-network/projects/issues/29" data-hovercard-type="issue" data-hovercard-url="/bisq-network/projects/issues/29/hovercard" href="https://github.com/bisq-network/projects/issues/29">#29</a> will complement this very issue.</p>

<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/projects/issues/28#issuecomment-621725436">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNW3BIWJQJVEECWJ7LLRPFBHBANCNFSM4MCFKKWA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNVZIIZXIYIRAS5BUETRPFBHBA5CNFSM4MCFKKWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEUHMN7A.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/projects/issues/28#issuecomment-621725436",
"url": "https://github.com/bisq-network/projects/issues/28#issuecomment-621725436",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>