File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -304,7 +304,7 @@ void Device::connectAsListener(
304304 const Address& local,
305305 std::chrono::milliseconds timeout,
306306 ConnectCallback connectCallback) {
307- defer ([=] {
307+ defer ([=, this ] {
308308 decltype (pendingConnections_)::mapped_type pendingConnection;
309309
310310 // Find pending connection, or stash the connect callback.
@@ -360,7 +360,7 @@ void Device::connectAsInitiator(
360360 const Address& remote,
361361 std::chrono::milliseconds timeout,
362362 ConnectCallback fn) {
363- defer ([=] {
363+ defer ([=, this ] {
364364 auto tcp = loop_->resource <libuv::TCP>();
365365 auto timer = loop_->resource <libuv::Timer>();
366366
@@ -458,7 +458,7 @@ void Device::listenCallback() {
458458
459459 // Wait for remote side to write sequence number.
460460 handle->once <libuv::ReadEvent>(
461- [=](const libuv::ReadEvent& event, libuv::TCP& handle) {
461+ [=, this ](const libuv::ReadEvent& event, libuv::TCP& handle) {
462462 // Sequence number has been read. Either there is an existing
463463 // connection callback for this sequence number, or we'll hold
464464 // on to the handle while we wait for the pair to pass a
Original file line number Diff line number Diff line change @@ -554,7 +554,7 @@ void Pair::closeWhileHoldingPairLock() {
554554 state_, CONNECTING, " Cannot close pair while waiting on connection" );
555555 break ;
556556 case CONNECTED:
557- device_->defer ([=] { this ->handle_ ->close (); });
557+ device_->defer ([=, this ] { this ->handle_ ->close (); });
558558 state_ = CLOSING;
559559 break ;
560560 case CLOSING:
You can’t perform that action at this time.
0 commit comments