Closed
Description
Describe the bug
- JsonRpcConnection#Send*() posts a closure with the message in question into its strand which processes such sequentially
- That closure inserts the message into #m_OutgoingMessagesQueue
Especially ApiListener#ReplayLog() fills it aggressively. After some time that queue is emptied by #WriteOutgoingMessages(). Unless it's been stopped, either by itself or by #Disconnect().
Expected behavior
- #Disconnect() immediately sets an atomic bool
- (1) and (2) from above happen only depending on that bool (also consult https://en.cppreference.com/w/cpp/atomic/memory_order)
- The closure #Disconnect() posts clears #m_OutgoingMessagesQueue ASAP
Additional context
ref/IP/48306
ref/IP/52366