mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 14:02:06 +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:
parent
352e422562
commit
f34f37a20c
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue