graceful shutdown kill protocol + double session checking

This commit is contained in:
rfi
2023-11-14 21:12:15 +07:00
parent 726af535e1
commit e850a18d54
4 changed files with 40 additions and 6 deletions

View File

@@ -61,7 +61,7 @@ namespace AscNet.GameServer
public Session? SessionFromUID(long uid)
{
return Sessions.FirstOrDefault(x => x.Value.player.PlayerData.Id == uid).Value;
return Sessions.Select(x => x.Value).FirstOrDefault(x => x.player.PlayerData.Id == uid);
}
}
}