Skip to content

Commit

Permalink
Also reset/remove timer on expiry
Browse files Browse the repository at this point in the history
  • Loading branch information
tm604 committed Sep 10, 2015
1 parent b33483c commit f042fec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/net/asio/http/connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ class connection : virtual public std::enable_shared_from_this<connection> {
} else {
/* Timer has expired */
// std::cerr << "Timer expired\n";
self->timer_.reset();
self->close();
if(self->res_ && !self->res_->completion()->is_ready())
self->res_->completion()->fail("Timeout expired (" + std::to_string(target.count()) + "ms)");
Expand Down

0 comments on commit f042fec

Please sign in to comment.