Respond to path challenge. Correct termination reason for duplicated session

This commit is contained in:
orignal 2022-08-02 13:35:18 -04:00
parent 9d9d5e3e5d
commit 98d2ce5845
3 changed files with 20 additions and 2 deletions

View file

@ -292,7 +292,7 @@ namespace transport
// session already exists
LogPrint (eLogWarning, "SSU2: Session to ", ident->GetIdentHash ().ToBase64 (), " already exists");
// terminate existing
GetService ().post (std::bind (&SSU2Session::RequestTermination, ret.first->second, eSSU2TerminationReasonTerminationReceived));
GetService ().post (std::bind (&SSU2Session::RequestTermination, ret.first->second, eSSU2TerminationReasonReplacedByNewSession));
// update session
ret.first->second = session;
}