EpicGames / EOS-Getting-Started

MIT License
110 stars 62 forks source link

EndSession() clear the StartSessionDelegateHandle instead of EndSessionDelegateHandle #17

Closed Daemon34 closed 9 months ago

Daemon34 commented 10 months ago

Hello,

I think there is a mistake in the EndSession() function here :

if (!Session->EndSession(SessionName))
{
        UE_LOG(LogTemp, Warning, TEXT("Failed to end session!"));
    Session->ClearOnEndSessionCompleteDelegate_Handle(StartSessionDelegateHandle);
        EndSessionDelegateHandle.Reset();
}

This clear the StartSessionDelegateHandle, but I think it should clear the EndSessionDelegateHandle

SebBergy commented 9 months ago

Yes, this is a mistake. Thank you for catching and reporting this mistake. I've just committed an update to the code here: https://github.com/EpicGames/EOS-Getting-Started/commit/0cf4ad6bb92c285efde069382566910a6a45e8da