carlosCharz / fcmxmppserverv2

XMPP Connection Server for FCM using the latest version of the Smack library (4.3.4) + Connection Draining Implementation
47 stars 33 forks source link

Keep the main thread alive #7

Closed long1eu closed 7 years ago

long1eu commented 7 years ago

You can this to keep the main thread alive:

        try {
            CountDownLatch latch = new CountDownLatch(1);
            latch.await();
        } catch (InterruptedException e) {
            logger.log(Level.SEVERE, "An error occurred while latch was waiting.", e);
        }
carlosCharz commented 7 years ago

Thanks. It worked well!

long1eu commented 7 years ago

You welcome!

carlosCharz commented 7 years ago

I know from the documentation that FCM will try to resend to your server several times until you confirm with an ACK. Check if this is your issue? Check the documentation about the acks you should send. I was doing that in the code. I had no problems now but check it out just in case.

long1eu commented 7 years ago

You were right! Thanks so much!