Steam kick bugfixes

This commit is contained in:
Anuken
2023-03-25 11:11:06 -04:00
parent d07706e039
commit 0daafc5ff3
4 changed files with 31 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
package mindustry.net;
import arc.*;
import arc.struct.*;
import arc.util.*;
import mindustry.entities.units.*;
@@ -76,7 +77,12 @@ public abstract class NetConnection{
Call.kick(this, reason);
}
close();
if(uuid.startsWith("steam:")){
//run with a 2-frame delay so there is time to send the kick packet, steam handles this weirdly
Core.app.post(() -> Core.app.post(this::close));
}else{
close();
}
netServer.admins.save();
kicked = true;