From d3e4ee71c9ab1966902e71c13d7ebce8d713b33b Mon Sep 17 00:00:00 2001 From: CodeSteak Date: Wed, 19 Jun 2019 21:33:21 +0200 Subject: [PATCH] fix windows not auto reconnecting --- .../org/hso/texturesyncclient/controller/net/Connection.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/controller/net/Connection.kt b/client/src/main/kotlin/org/hso/texturesyncclient/controller/net/Connection.kt index f3faba5..b7fad77 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/controller/net/Connection.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/controller/net/Connection.kt @@ -23,7 +23,7 @@ class Connection(val address: InetAddress, val port: Int = 10796) : Closeable { val i: DataInputStream val o: DataOutputStream - if (socket == null || !socket!!.isConnected) { + if (socket == null || socket!!.isClosed || !socket!!.isConnected) { val sock = Socket() sock.soTimeout = 10_000 /*ms*/ sock.keepAlive = true