Skip to content

Commit 00cb9a7

Browse files
committed
Add missing isConnected override to uv transport
1 parent afc1517 commit 00cb9a7

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

cmake/Dependencies.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ if(USE_LIBUV)
9191

9292
add_library(uv_a INTERFACE IMPORTED)
9393
set_target_properties(uv_a PROPERTIES
94-
INTERFACE_INCLUDE_DIRECTORIES ${libuv_INCLUDE_DIRS}
95-
INTERFACE_LINK_LIBRARIES ${libuv_LIBRARY}
94+
INTERFACE_INCLUDE_DIRECTORIES "${libuv_INCLUDE_DIRS}"
95+
INTERFACE_LINK_LIBRARIES "${libuv_LIBRARY}"
9696
)
9797
endif()
9898
endif()

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)