XMPP client getting disconnected from openfire after 24 hours

We have an iOS xmpp client, which works fine in backgroud. But after some hours (around 24), the client is disconnected. I dont think it is a client side issue as the app is not crashing. We are not sending or receiving any mesaages or anything. Am wondering if openfire closes the socket or kicks the user. The ping time is 360 secs. My client responds to ping with an error which itself is a response (as mentioned in the openfire doc), so no issues with that. Is there some setting which am missing here. The app is in the background and it gets disconnected.