Skip to content

Commit

Permalink
unconditionally reset write in progress in handle_write_complete
Browse files Browse the repository at this point in the history
  • Loading branch information
wallyatgithub committed May 4, 2023
1 parent 93606a0 commit 4b2eca4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions asio_client_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,8 @@ void asio_client_connection::do_read()

void asio_client_connection::handle_write_complete(const boost::system::error_code& e, std::size_t bytes_transferred)
{
is_write_in_progress = false;

if (e)
{
if (!is_error_due_to_aborted_operation(e))
Expand All @@ -810,8 +812,6 @@ void asio_client_connection::handle_write_complete(const boost::system::error_co

restart_timeout_timer();

is_write_in_progress = false;

if (write_clear_callback)
{
auto func = std::move(write_clear_callback);
Expand Down

0 comments on commit 4b2eca4

Please sign in to comment.