Skip to content

Commit cb689af

Browse files
authored
Merge pull request #223 from c-jimenez/fix/rpc_start_stop
[rpc] Fix start-stop-start sequence
2 parents c8ed7e1 + 6fc6c6d commit cb689af

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)