Ver a proveniência

only send unlock message once

tags/v0.1.6
Jonathan Cobb há 4 anos
ascendente
cometimento
e0842b2ae1
1 ficheiros alterados com 5 adições e 3 eliminações
  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 Ver ficheiro

@@ -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()));
}
}
}
}


Carregando…
Cancelar
Guardar