From 11ae6d6960f51561fbce37666ab04757554ebe14 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sat, 18 May 2019 13:24:05 +0200 Subject: [PATCH] Socks5Proxy: Use CloseableUtil to close server socket --- .../smackx/bytestreams/socks5/Socks5Proxy.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Proxy.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Proxy.java index 928990970..61a26c9ab 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Proxy.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Proxy.java @@ -230,12 +230,7 @@ public final class Socks5Proxy { return; } - try { - this.serverSocket.close(); - } - catch (IOException e) { - // do nothing - } + CloseableUtil.maybeClose(this.serverSocket, LOGGER); if (this.serverThread != null && this.serverThread.isAlive()) { try {