Capture all boost::system::error_codes by ref
Capturing these possibly overloaded values by reference can avoid a copy
in some cases, and it's good to be consistent.
This change was made automatically by grep/sed.
Tested: Code compiles.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Iafeaca2a5dc52f39753b5a3880419d6bc943f81b
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
index 2139602..7b66ac8 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -602,7 +602,7 @@
std::weak_ptr<Connection<Adaptor, Handler>> weakSelf = weak_from_this();
timer.expires_after(timeout);
- timer.async_wait([weakSelf](const boost::system::error_code ec) {
+ timer.async_wait([weakSelf](const boost::system::error_code& ec) {
// Note, we are ignoring other types of errors here; If the timer
// failed for any reason, we should still close the connection
std::shared_ptr<Connection<Adaptor, Handler>> self =