Closed long1eu closed 7 years ago
I have modified a little bit the ccsConnection class but it is almost the same because in connection draining I am calling the reconnect method:
public void reconnection() { BackOffStrategy backoff = new BackOffStrategy(); while (backoff.shouldRetry()) { try { initialize(); backoff.doNotRetry(); } catch (XMPPException | SmackException | IOException e) { logger.info("The notifier server could not reconnect after the connection draining message"); backoff.errorOccured(); } } }
@PostConstruct public void initialize() throws XMPPException, SmackException, IOException { // Create the connection connection = new XMPPTCPConnection(connConfiguration);
// Connect
connection.connect();
...
// Login to FCM
}
Hope it helps
Hi @long1eu
I just pushed the connection draining logic to the main branch if you want to check it out. Links:
Hope you can find it useful. Greetings!
Thank you so much! Hope you're well!
How do you handle CONNECTION_DRAINING message?
I'm doing this: