summaryrefslogtreecommitdiffstats
path: root/src/lib/http/connection.cc
diff options
context:
space:
mode:
authorMarcin Siodelski <marcin@isc.org>2017-05-24 17:05:56 +0200
committerMarcin Siodelski <marcin@isc.org>2017-05-24 17:10:12 +0200
commit07d85808c0c37d08ca9605d63c0b9c9d26b8942d (patch)
treeb2c31bdf832f3b93979b140f74a38b5d67add2cb /src/lib/http/connection.cc
parent[master] scripts upgrade_5.0_to_5.1.sh upgrade_3.0_to_3.1.sh will be now inst... (diff)
downloadkea-07d85808c0c37d08ca9605d63c0b9c9d26b8942d.tar.xz
kea-07d85808c0c37d08ca9605d63c0b9c9d26b8942d.zip
[5261] Eliminated valgrind errors in libkea-http.
Diffstat (limited to 'src/lib/http/connection.cc')
-rw-r--r--src/lib/http/connection.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/http/connection.cc b/src/lib/http/connection.cc
index 6944bf2b37..1e5f5cb2ec 100644
--- a/src/lib/http/connection.cc
+++ b/src/lib/http/connection.cc
@@ -148,8 +148,12 @@ HttpConnection::acceptorCallback(const boost::system::error_code& ec) {
HTTP_REQUEST_RECEIVE_START)
.arg(getRemoteEndpointAddressAsText())
.arg(static_cast<unsigned>(request_timeout_/1000));
+ // Pass raw pointer rather than shared_ptr to this object,
+ // because IntervalTimer already passes shared pointer to the
+ // IntervalTimerImpl to make sure that the callback remains
+ // valid.
request_timer_.setup(boost::bind(&HttpConnection::requestTimeoutCallback,
- shared_from_this()),
+ this),
request_timeout_, IntervalTimer::ONE_SHOT);
doRead();
}