1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-26 08:12:05 +01:00

Check for 'null' to avoid NPE in Socks5Proxy

Check if serverSocket is null before calling isClosed(), as otherwise
the resulting NPE will cause an endless loop.

Thanks to Michael Grafl for reporting.

Fixes SMACK-707.
This commit is contained in:
Florian Schmaus 2015-12-10 17:10:49 +01:00
parent 352e422562
commit f34f37a20c

View file

@ -387,7 +387,7 @@ public class Socks5Proxy {
try { try {
if (Socks5Proxy.this.serverSocket.isClosed() if (Socks5Proxy.this.serverSocket == null || Socks5Proxy.this.serverSocket.isClosed()
|| Thread.currentThread().isInterrupted()) { || Thread.currentThread().isInterrupted()) {
return; return;
} }