QBChat instance has 90 seconds timeout. After a timeout the socket is closing. You need to keep up the connection by sending the (BOOL)sendPresence message to QBChat instance object. This will support the chat workflow. It is better to do this via timer. For example:
self.presenceTimer=[NSTimer scheduledTimerWithTimeInterval:30 target:[QBChat instance]
selector:@selector(sendPresence) userInfo:nil repeats:YES];
This way you show that user is online, can send and receive messages.