I am using embedded C instamsg library on one of my custom IoT devices . the device is deployed in field and running on UPS power supply. Device has a Texas controller(TM4C 1230D5PMI) and telit GE865Dual band GSM processor for connectivity.
Recently we have observed one issue that Device is online on instamsg server and actually it was offline due to some reasons.
If the IoT device does not close a socket (due to some reason), the socket might not be terminated at the InstaMsg cloud server for some time. The time would depend on the Keep Alive timer setting on the InstaMsg client. It enables the server to detect that the network connection to a Client has dropped. The InstaMsg client sends a message or a ping within each Keep Alive time period. If the InstaMsg does not receive a message or a ping from the client within one and a half times the Keep Alive time period, it disconnects the client. So even if your device did not close the socket correctly the InstaMsg would have closed it anyhow on expiry of this timer. Somehow your device is still connected with InstaMsg.