connection bug fixes

master
Omer Schloss 3 years ago
parent c5e27c2ca7
commit 6f5cb3186c

@ -13,15 +13,15 @@ class TelnetClient{
private lateinit var executor: ExecutorService
fun connect(ipAddress: String, portAddress: Int): Boolean {
try {
return try {
client = Socket()
client.connect(InetSocketAddress(ipAddress, portAddress),2000)
output = PrintWriter(client.getOutputStream(), true)
executor = Executors.newSingleThreadExecutor()
return true
true
}catch (e: Exception){
e.printStackTrace()
throw RuntimeException(e)
false
}
}

Loading…
Cancel
Save