Instead of keeping messages, which could not be sent during a connection loss, persist them in a file or sqllite database.
Activity
[-]Persist Messaings in a file[/-][+]Persist messages in a file[/+]