How to auto-reconnect to XMPP server (smack-tcp v4.1.9)?

Hi, I have troubles with Smack v4.1.9, here are all the details : https://stackoverflow.com/questions/52426107/how-to-auto-reconnect-to-xmpp-server