UPnP: Race-proof the fix

This commit is contained in:
zzz
2021-01-30 08:46:29 -05:00
parent 33397433ac
commit af4c41ef08

View File

@@ -203,9 +203,10 @@ public class HTTPUSocket
}
catch (Exception e) {
// I2P prevent NPE android gitlab #1
if (ssdpUniSock != null) {
Debug.warning("addr = " +ssdpUniSock.getLocalAddress().getHostName());
Debug.warning("port = " + ssdpUniSock.getLocalPort());
DatagramSocket sock = ssdpUniSock;
if (sock != null) {
Debug.warning("addr = " + sock.getLocalAddress().getHostName());
Debug.warning("port = " + sock.getLocalPort());
}
Debug.warning(e);
return false;