Skip to content

Commit

Permalink
Fix error assignment.
Browse files Browse the repository at this point in the history
  • Loading branch information
mzimbres committed Nov 2, 2024
1 parent 7f9ac6f commit ca2c4ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions include/boost/redis/detail/connector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ struct connect_op {
ctor_->endpoint_ = ep;

if (ec == asio::error::operation_aborted) {
ec == error::connect_timeout;
self.complete(redis::error::connect_timeout);
} else {
self.complete(ec);
}

self.complete(ec);
}
}
};
Expand Down
5 changes: 3 additions & 2 deletions include/boost/redis/detail/resolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ struct resolve_op {
resv_->results_ = res;

if (ec == asio::error::operation_aborted) {
ec == error::resolve_timeout;
self.complete(error::resolve_timeout);
} else {
self.complete(ec);
}
self.complete(ec);
}
}
};
Expand Down

0 comments on commit ca2c4ef

Please sign in to comment.