We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4debeac commit d6b28afCopy full SHA for d6b28af
1 file changed
lib/microLB/micro_lb/balancer.cpp
@@ -202,13 +202,14 @@ namespace microLB
202
assert(outgoing->is_connected());
203
LBOUT("Assigning client to node %d (%s)\n",
204
algo_iterator, outgoing->to_string().c_str());
205
- auto& session = this->create_session(
206
- std::move(conn), std::move(outgoing));
207
- // flush readq to session.outgoing
+ // flush readq to outgoing before creating session
208
for (auto buffer : readq) {
209
LBOUT("*** Flushing %lu bytes\n", buffer->size());
210
- session.outgoing->write(buffer);
+ outgoing->write(buffer);
211
}
+ auto& session = this->create_session(
+ std::move(conn), std::move(outgoing));
212
+
213
return nullptr;
214
215
0 commit comments