MUC not rejoin on login after more then two minutes in Android

I am using smack-android:4.2.0 for creating a simple chat app for groups I have created MUC chatroom every thing including subscription is working just fine. If I logout and then login again in the time span of 2minutes then the user automatically join the groups but if user login after 2 minutes then user can’t rejoin any group.