| 870 | } |
| 871 | |
| 872 | bool SSU2Server::CheckPendingOutgoingSession (const boost::asio::ip::udp::endpoint& ep, bool peerTest) |
| 873 | { |
| 874 | auto s = FindPendingOutgoingSession (ep); |
| 875 | if (s) |
| 876 | { |
| 877 | if (peerTest) |
| 878 | { |
| 879 | // if peer test requested add it to the list for pending session |
| 880 | auto onEstablished = s->GetOnEstablished (); |
| 881 | if (onEstablished) |
| 882 | s->SetOnEstablished ([s, onEstablished]() |
| 883 | { |
| 884 | onEstablished (); |
| 885 | s->SendPeerTest (); |
| 886 | }); |
| 887 | else |
| 888 | s->SetOnEstablished ([s]() { s->SendPeerTest (); }); |
| 889 | } |
| 890 | return true; |
| 891 | } |
| 892 | return false; |
| 893 | } |
| 894 | |
| 895 | bool SSU2Server::CreateSession (std::shared_ptr<const i2p::data::RouterInfo> router, |
| 896 | std::shared_ptr<const i2p::data::RouterInfo::Address> address, bool peerTest) |
nothing calls this directly
no test coverage detected