Selaa lähdekoodia

only send unlock message once

tags/v0.1.6
Jonathan Cobb 4 vuotta sitten
vanhempi
commit
e0842b2ae1
1 muutettua tiedostoa jossa 5 lisäystä ja 3 poistoa
  1. +5
    -3
      bubble-server/src/main/java/bubble/service/boot/SageHelloService.java

+ 5
- 3
bubble-server/src/main/java/bubble/service/boot/SageHelloService.java Näytä tiedosto

@@ -63,9 +63,11 @@ public class SageHelloService extends SimpleDaemon {
log.info("hello_to_sage: received reply from sage node: " + json(receipt, COMPACT_MAPPER));
if (receipt.isSuccess()) {
if (!sageHelloSent.get()) sageHelloSent.set(true);
if (unlockMessage.get() != null) {
final AccountMessageDAO messageDAO = c.getBean(AccountMessageDAO.class);
messageDAO.create(unlockMessage.get());
synchronized (unlockMessage) {
if (unlockMessage.get() != null && !unlockMessage.get().hasUuid()) {
final AccountMessageDAO messageDAO = c.getBean(AccountMessageDAO.class);
unlockMessage.set(messageDAO.create(unlockMessage.get()));
}
}
}
}


Ladataan…
Peruuta
Tallenna