Skip to content

Commit 6fc6c6d

Browse files
committed
[rpc] Fix start-stop-start sequence
1 parent c8ed7e1 commit 6fc6c6d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/rpc/RpcBase.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,10 @@ void RpcBase::start()
223223
// Initialize transaction id sequence
224224
m_transaction_id = std::rand();
225225

226+
// Start queues
227+
m_requests_queue.setEnable(true);
228+
m_results_queue.setEnable(true);
229+
226230
// Check if a pool has been configured
227231
if (m_pool)
228232
{
@@ -232,8 +236,6 @@ void RpcBase::start()
232236
else
233237
{
234238
// Start reception thread
235-
m_requests_queue.setEnable(true);
236-
m_results_queue.setEnable(true);
237239
m_rx_thread = new std::thread(std::bind(&RpcBase::rxThread, this));
238240
}
239241
}

0 commit comments

Comments
 (0)