Fix process not cleanly exiting when it was supposed to

This commit is contained in:
zontreck 2024-06-05 20:28:19 -07:00
parent 26434a9123
commit 6574888344
4 changed files with 32 additions and 7 deletions

View file

@ -1,5 +1,6 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:libac_dart/nbt/NbtUtils.dart';
import 'package:libac_dart/nbt/Stream.dart';
@ -303,6 +304,7 @@ class C2SUploadSettingsPacket implements IPacket {
// Stop packet server
PacketServer.socket!.close();
timer.cancel();
exit(0);
}); // We give time to allow the server to shut down gracefully.
}