Fix errors on windows
[ci skip]
This commit is contained in:
parent
0bb20c29a3
commit
b9f4278b0e
|
@ -193,9 +193,11 @@ class Nyxx implements Disposable {
|
|||
throw MissingTokenError();
|
||||
}
|
||||
|
||||
ProcessSignal.sigterm.watch().forEach((event) async {
|
||||
await this.dispose();
|
||||
});
|
||||
if(!Platform.isWindows) {
|
||||
ProcessSignal.sigterm.watch().forEach((event) async {
|
||||
await this.dispose();
|
||||
});
|
||||
}
|
||||
|
||||
ProcessSignal.sigint.watch().forEach((event) async {
|
||||
await this.dispose();
|
||||
|
|
|
@ -48,10 +48,12 @@ Future<void> _shardHandler(SendPort shardPort) async {
|
|||
shardPort.send({ "cmd" : "TERMINATE_OK" });
|
||||
}
|
||||
|
||||
// ignore: unawaited_futures
|
||||
ProcessSignal.sigterm.watch().forEach((event) async {
|
||||
await terminate();
|
||||
});
|
||||
if(!Platform.isWindows) {
|
||||
// ignore: unawaited_futures
|
||||
ProcessSignal.sigterm.watch().forEach((event) async {
|
||||
await terminate();
|
||||
});
|
||||
}
|
||||
|
||||
// ignore: unawaited_futures
|
||||
ProcessSignal.sigint.watch().forEach((event) async {
|
||||
|
|
Loading…
Reference in a new issue