Fix dead lobbies and other bugs

This commit is contained in:
twoischnig committed 2026-04-15 22:23:07 +02:00
1 parent 8862c6c8a6
commit c198d8a727
5 files changed
+488 -221

No files matched your search

+4 -2
View File
@@ -25,8 +25,10 @@ _ = Task.Run(() =>
{
while (running)
{
foreach (var lobbyEvent in lobbyClient.ReadEvents(20))
while (lobbyClient.TryReadEvent(out var lobbyEvent))
{
if (lobbyEvent == null) continue;
switch (lobbyEvent.EventType)
{
case LobbyClientEventTypes.LobbyJoinFailed:
@@ -169,7 +171,7 @@ _ = Task.Run(() =>
lobbyClient.QueryExternalIpAndPort((remoteEndpoint, messageData, messageLength) =>
{
fakeGameHost.Send(remoteEndpoint, messageData, messageLength);
});
}, out var ip, out var port);
var ep = new IPEndPoint(IPAddress.Parse(lobbyRequestNatPunch.ClientIp!), lobbyRequestNatPunch.ClientPort);
for (int z = 0; z < 32; z++)