mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
fix: fix batching during dispatch mode changes (#1713)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
This commit is contained in:
parent
c65b9cf63d
commit
003d2031b5
1 changed files with 3 additions and 1 deletions
|
@ -798,8 +798,10 @@ void Connection::DispatchFiber(util::FiberSocketBase* peer) {
|
|||
dispatch_q_.pop_front();
|
||||
}
|
||||
|
||||
if (dispatch_q_.empty())
|
||||
if (dispatch_q_.empty()) {
|
||||
builder->FlushBatch();
|
||||
builder->SetBatchMode(false); // in case the next dispatch is sync
|
||||
}
|
||||
} else {
|
||||
MessageHandle msg = move(dispatch_q_.front());
|
||||
dispatch_q_.pop_front();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue