diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-11-25 18:58:15 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-08-18 22:56:48 +0200 |
commit | e66f3b1adec087dd7d47c6e25d26961d768ee3b8 (patch) | |
tree | a671b73a6e00872948bcba86991de490431c5736 /src/DirectConnection.cpp | |
parent | 2e6595fe6183fc9e388449abf3a105d43f96f7fa (diff) |
Fix routing of data
Diffstat (limited to 'src/DirectConnection.cpp')
-rw-r--r-- | src/DirectConnection.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/DirectConnection.cpp b/src/DirectConnection.cpp index d92c972..5c072d5 100644 --- a/src/DirectConnection.cpp +++ b/src/DirectConnection.cpp @@ -171,7 +171,7 @@ namespace sibs peersMutex.unlock(); } - Log::debug("DirectConnections: Connecting to peer (ip: %s, port: %d, rendezvous: %s)", address.getAddress().c_str(), address.getPort(), rendezvous ? "yes" : "no"); + Log::debug("DirectConnections: Connecting to %s peer (ip: %s, port: %d, rendezvous: %s)", server ? "server" : "client", address.getAddress().c_str(), address.getPort(), rendezvous ? "yes" : "no"); if(UDT::connect(socketId, (sockaddr*)&address.address, sizeof(address.address)) == UDT::ERROR) { if(connectCallbackFunc) @@ -373,7 +373,10 @@ namespace sibs if(removePeer(receivedDataFromPeer)) Log::debug("UDT: Removed peer socket %d", receivedDataFromPeer); else - Log::error("UDT: Failed to remove peer socket %d, system said we got data from it but we are not connected to it", receivedDataFromPeer); + { + Log::error("UDT: Failed to remove peer socket %d, system said we got event from it but we are not connected to it", receivedDataFromPeer); + UDT::epoll_remove_usock(eid, receivedDataFromPeer); + } } } } |