Handle interrupted exceptions in thin client reader

When exiting the thin client, an interrupted exception stack trace ends
up being printed because NonFatal doesn't include interrupted
exceptions.

Fixes https://github.com/sbt/sbt/issues/5759
This commit is contained in:
Ethan Atkins 2020-08-15 13:48:53 -07:00
parent 5cf8e9f65e
commit 8c07493c1f
1 changed files with 1 additions and 1 deletions

View File

@ -905,7 +905,7 @@ class NetworkClient(
}
}
try Terminal.console.withRawInput(read())
catch { case NonFatal(_) => stopped.set(true) }
catch { case _: InterruptedException | NonFatal(_) => stopped.set(true) }
}
def drain(): Unit = inLock.synchronized {