Make some experimental changes
This commit is contained in:
parent
577b310d45
commit
09967de31b
4 changed files with 27 additions and 21 deletions
|
@ -1,3 +1,4 @@
|
|||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:libac_dart/nbt/NbtUtils.dart';
|
||||
|
@ -297,9 +298,12 @@ class C2SUploadSettingsPacket implements IPacket {
|
|||
SessionData.CURRENT_INTERVAL = WarnIntervals.NONE;
|
||||
|
||||
if (settings.subsys.currentState == States.Inactive) {
|
||||
SessionData.shutdownPending = true;
|
||||
// Stop packet server
|
||||
PacketServer.socket!.close();
|
||||
Timer.periodic(Duration(seconds: 10), (timer) {
|
||||
SessionData.shutdownPending = true;
|
||||
// Stop packet server
|
||||
PacketServer.socket!.close();
|
||||
timer.cancel();
|
||||
}); // We give time to allow the server to shut down gracefully.
|
||||
}
|
||||
|
||||
return PacketResponse.nil;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue