Fix client problems on WIndows, fixes #387

This commit is contained in:
Guillaume Nodet
2021-05-19 11:13:09 +02:00
parent 03e7e8ec01
commit 9bcee2977b

View File

@@ -162,6 +162,7 @@ public class TerminalOutput implements ClientOutput {
this.log = logFile == null ? new MessageCollector() : new FileLog(logFile); this.log = logFile == null ? new MessageCollector() : new FileLog(logFile);
if (!dumb) { if (!dumb) {
final Thread r = new Thread(this::readInputLoop); final Thread r = new Thread(this::readInputLoop);
r.setDaemon(true);
r.start(); r.start();
this.reader = r; this.reader = r;
} else { } else {
@@ -483,7 +484,6 @@ public class TerminalOutput implements ClientOutput {
closing = true; closing = true;
if (reader != null) { if (reader != null) {
reader.interrupt(); reader.interrupt();
reader.join();
} }
log.close(); log.close();
terminal.handle(Terminal.Signal.INT, previousIntHandler); terminal.handle(Terminal.Signal.INT, previousIntHandler);