Adjust cleanup logic to handle Session events more cohesively

This commit is contained in:
puvvadar
2021-06-23 10:56:22 -07:00
parent 9aa44a56e7
commit bda758a9c5
3 changed files with 28 additions and 10 deletions
@@ -115,6 +115,10 @@ namespace AzNetworking
bool UdpConnection::Disconnect(DisconnectReason reason, TerminationEndpoint endpoint)
{
if (m_state == ConnectionState::Disconnected)
{
return true;
}
if (m_state == ConnectionState::Disconnecting)
{
AZStd::string reasonString = ToString(reason);