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

@@ -151,7 +151,7 @@ public class BeControl{
Log.info("&lcAutosaved.");
netServer.kickAll(KickReason.serverRestarting);
Threads.sleep(32);
Threads.sleep(500);
Log.info("&lcVersion downloaded, exiting. Note that if you are not using a auto-restart script, the server will not restart automatically.");
//replace old file with new

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;