Fix NPE with null session in MQTTConnectionManager.disconnect()
This commit is contained in:
parent
a6a03d4985
commit
9963f96033
|
@ -106,8 +106,11 @@ public class MQTTConnectionManager {
|
|||
}
|
||||
|
||||
void disconnect() {
|
||||
if (session == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (session != null && session.getSessionState() != null) {
|
||||
if (session.getSessionState() != null) {
|
||||
String clientId = session.getSessionState().getClientId();
|
||||
if (clientId != null)
|
||||
CONNECTED_CLIENTS.remove(clientId);
|
||||
|
|
Loading…
Reference in New Issue