diff --git a/lib-protocol/source/channel.cpp b/lib-protocol/source/channel.cpp index 8f9813093..10adad688 100644 --- a/lib-protocol/source/channel.cpp +++ b/lib-protocol/source/channel.cpp @@ -79,15 +79,12 @@ Channel::Channel(BufferDrain &drain, const S &peer, int id, const std::str { } -task Channel::Wire(BufferSunk &sunk, S base, Configuration configuration, const std::function (std::string)> &respond) { +task Channel::Wire(BufferSunk &sunk, S base, Configuration configuration, const std::function (std::string)> &respond) { const auto client(co_await Post([&]() { return Make(std::move(base), std::move(configuration)); })); auto &channel(*co_await Post([&]() { return &sunk.Wire(client); })); const auto answer(co_await respond(Strip(co_await client->Offer()))); co_await client->Negotiate(answer); co_await channel.Open(); - const auto candidate(co_await client->Candidate()); - const auto &socket(candidate.address()); - co_return Socket(socket.ipaddr().ipv4_address(), socket.port()); } void Channel::OnStateChange() noexcept { diff --git a/lib-protocol/source/channel.hpp b/lib-protocol/source/channel.hpp index e4565ad23..9f91bf7fe 100644 --- a/lib-protocol/source/channel.hpp +++ b/lib-protocol/source/channel.hpp @@ -51,7 +51,7 @@ class Channel : Channel(BufferDrain &drain, const S &peer, rtc::scoped_refptr channel); Channel(BufferDrain &drain, const S &peer, int id = -1, const std::string &label = std::string(), const std::string &protocol = std::string()); - static task Wire(BufferSunk &sunk, S base, Configuration configuration, const std::function (std::string)> &respond); + static task Wire(BufferSunk &sunk, S base, Configuration configuration, const std::function (std::string)> &respond); void OnStateChange() noexcept override; void OnBufferedAmountChange(uint64_t previous) noexcept override; diff --git a/vpn-shared/source/client.cpp b/vpn-shared/source/client.cpp index eb7716464..a46a6c919 100644 --- a/vpn-shared/source/client.cpp +++ b/vpn-shared/source/client.cpp @@ -141,7 +141,7 @@ task Client::Open(const Provider &provider, const S &base) { auto &bonding(Bond()); auto &defragment(bonding.Wire>()); - socket_ = co_await Channel::Wire(defragment, base, [&]() { + co_await Channel::Wire(defragment, base, [&]() { Configuration configuration; configuration.tls_ = local_; return configuration; diff --git a/vpn-shared/source/client.hpp b/vpn-shared/source/client.hpp index b5291b1f7..85a791125 100644 --- a/vpn-shared/source/client.hpp +++ b/vpn-shared/source/client.hpp @@ -73,7 +73,6 @@ class Client : }; Locked locked_; Nest nest_; - Socket socket_; void Transfer(size_t size, bool send);