Skip to content

Commit 89abe67

Browse files
dsciebufacebook-github-bot
authored andcommitted
Add missing isConnected override to uv transport (#381)
Summary: Project does not build with -DUSE_LIBUV=ON , due to the introduction of virtual isConnected() in base Pair class. This patch fixes it. Pull Request resolved: #381 Reviewed By: DanilBaibak Differential Revision: D53003428 Pulled By: malfet fbshipit-source-id: a406a6fce10d202f06bc2c2ca5f066d6befaf292
1 parent afc1517 commit 89abe67

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

gloo/transport/uv/pair.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ const Address& Pair::address() const {
5252
return addr_;
5353
}
5454

55+
bool Pair::isConnected() {
56+
std::lock_guard<std::mutex> lock(mutex_);
57+
return state_ == CONNECTED;
58+
}
59+
5560
void Pair::connect(const std::vector<char>& bytes) {
5661
const auto peer = Address(bytes);
5762

gloo/transport/uv/pair.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ class Pair : public ::gloo::transport::Pair {
150150

151151
void close() override;
152152

153+
bool isConnected() override;
154+
153155
private:
154156
std::mutex mutex_;
155157
std::condition_variable cv_;

0 commit comments

Comments
 (0)