Heart beat smack

Hello I was wondering if anyone knows how to make sure that my connection session doesn;t become inactive in smack. It seems that multiuserchat.poll() doesn’t make sure the session is always active. Is there anyway to make sure the session stays active from the smack end ? Many thanks.