Skip to content

Commit

Permalink
Merge branch 'v0.22'
Browse files Browse the repository at this point in the history
  • Loading branch information
paullouisageneau committed Nov 28, 2024
2 parents e7d7dfb + 0d131af commit cc1986c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
12 changes: 3 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,7 @@ else()
add_library(Usrsctp::Usrsctp ALIAS usrsctp)

if(INSTALL_DEPS_LIBS)
# usrsctp lacks an export set
install(TARGETS usrsctp EXPORT UsrsctpTargets)
install(EXPORT UsrsctpTargets
FILE UsrsctpTargets.cmake
NAMESPACE Usrsctp::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/usrsctp
EXCLUDE_FROM_ALL)
install(TARGETS usrsctp EXPORT LibDataChannelTargets)
# Fix directories
set_target_properties(usrsctp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "")
target_include_directories(usrsctp INTERFACE
Expand Down Expand Up @@ -383,7 +377,7 @@ else()
if(NOT TARGET srtp2)
add_subdirectory(deps/libsrtp EXCLUDE_FROM_ALL)
if(INSTALL_DEPS_LIBS)
install(TARGETS srtp2)
install(TARGETS srtp2 EXPORT LibDataChannelTargets)
endif()
endif()
target_compile_definitions(datachannel PRIVATE RTC_SYSTEM_SRTP=0)
Expand Down Expand Up @@ -463,7 +457,7 @@ else()
else()
add_subdirectory(deps/libjuice EXCLUDE_FROM_ALL)
if(INSTALL_DEPS_LIBS)
install(TARGETS juice)
install(TARGETS juice EXPORT LibDataChannelTargets)
endif()
target_compile_definitions(datachannel PRIVATE RTC_SYSTEM_JUICE=0)
target_compile_definitions(datachannel-static PRIVATE RTC_SYSTEM_JUICE=0)
Expand Down
26 changes: 13 additions & 13 deletions src/impl/tcptransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,23 +200,23 @@ void TcpTransport::resolve() {
}

void TcpTransport::attempt() {
std::lock_guard lock(mSendMutex);
try {
std::lock_guard lock(mSendMutex);

if (state() != State::Connecting)
return; // Cancelled
if (state() != State::Connecting)
return; // Cancelled

if (mSock == INVALID_SOCKET) {
::closesocket(mSock);
mSock = INVALID_SOCKET;
}
if (mSock == INVALID_SOCKET) {
::closesocket(mSock);
mSock = INVALID_SOCKET;
}

if (mResolved.empty()) {
PLOG_WARNING << "Connection to " << mHostname << ":" << mService << " failed";
changeState(State::Failed);
return;
}
if (mResolved.empty()) {
PLOG_WARNING << "Connection to " << mHostname << ":" << mService << " failed";
changeState(State::Failed);
return;
}

try {
auto [addr, addrlen] = mResolved.front();
mResolved.pop_front();

Expand Down

0 comments on commit cc1986c

Please sign in to comment.