Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gloo/transport/uv/device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ void Device::connectAsListener(
const Address& local,
std::chrono::milliseconds timeout,
ConnectCallback connectCallback) {
defer([=] {
defer([=, this] {
decltype(pendingConnections_)::mapped_type pendingConnection;

// Find pending connection, or stash the connect callback.
Expand Down Expand Up @@ -360,7 +360,7 @@ void Device::connectAsInitiator(
const Address& remote,
std::chrono::milliseconds timeout,
ConnectCallback fn) {
defer([=] {
defer([=, this] {
auto tcp = loop_->resource<libuv::TCP>();
auto timer = loop_->resource<libuv::Timer>();

Expand Down Expand Up @@ -458,7 +458,7 @@ void Device::listenCallback() {

// Wait for remote side to write sequence number.
handle->once<libuv::ReadEvent>(
[=](const libuv::ReadEvent& event, libuv::TCP& handle) {
[=, this](const libuv::ReadEvent& event, libuv::TCP& handle) {
// Sequence number has been read. Either there is an existing
// connection callback for this sequence number, or we'll hold
// on to the handle while we wait for the pair to pass a
Expand Down
2 changes: 1 addition & 1 deletion gloo/transport/uv/pair.cc
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ void Pair::closeWhileHoldingPairLock() {
state_, CONNECTING, "Cannot close pair while waiting on connection");
break;
case CONNECTED:
device_->defer([=] { this->handle_->close(); });
device_->defer([=, this] { this->handle_->close(); });
state_ = CLOSING;
break;
case CLOSING:
Expand Down
Loading