Don't print socket exception on exit

When exiting the thin client when using tcp rather than a domain socket,
an error message is printed about a socket exception.
This commit is contained in:
Ethan Atkins 2020-11-17 12:34:36 -08:00
parent c52e9916e2
commit 29ce18edec
1 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,7 @@ package client
import java.io.{ File, IOException, InputStream, PrintStream }
import java.lang.ProcessBuilder.Redirect
import java.net.Socket
import java.net.{ Socket, SocketException }
import java.nio.file.Files
import java.util.UUID
import java.util.concurrent.atomic.{ AtomicBoolean, AtomicReference }
@ -888,6 +888,7 @@ class NetworkClient(
status.set("Processing")
}
} catch {
case e: SocketException if command.toString.contains("exit") => running.set(false)
case e: IOException =>
errorStream.println(s"Caught exception writing command to server: $e")
running.set(false)