Browse Source

Fix NPE on Firebase app cleanup

pull/13832/head
VIacheslavKlimov 1 year ago
parent
commit
e0c2051c6a
  1. 6
      application/src/main/java/org/thingsboard/server/service/notification/provider/DefaultFirebaseService.java

6
application/src/main/java/org/thingsboard/server/service/notification/provider/DefaultFirebaseService.java

@ -140,8 +140,10 @@ public class DefaultFirebaseService implements FirebaseService {
} }
public void destroy() { public void destroy() {
app.delete(); if (app != null) {
app = null; app.delete();
app = null;
}
messaging = null; messaging = null;
log.debug("[{}] Destroyed FirebaseContext", key); log.debug("[{}] Destroyed FirebaseContext", key);
} }

Loading…
Cancel
Save