Retry sending message to server if failed.