2
0
mirror of https://github.com/boostorg/redis.git synced 2026-02-09 23:32:35 +00:00

Simplifications.

This commit is contained in:
Marcelo Zimbres
2021-02-28 20:29:40 +01:00
parent a1a1e32364
commit 14ccf81785

View File

@@ -352,10 +352,7 @@ async_reader(
// The following loop apears again in this function below. We
// need to implement this as a composed operation.
while (!std::empty(reqs)) {
if (reqs.front().sent)
break;
while (!std::empty(reqs) && !reqs.front().sent) {
reqs.front().sent = true;
co_await async_write(
socket,
@@ -398,10 +395,7 @@ async_reader(
// Commands like unsubscribe have a push response so we do not
// have to wait for a response before sending a new request.
while (!std::empty(reqs)) {
if (reqs.front().sent)
break;
while (!std::empty(reqs) && !reqs.front().sent) {
reqs.front().sent = true;
co_await async_write(
socket,