Send guaranteed command is working based on regular send command, just that it is sent only when the connection is available, but if the connection is dropped before we receive the related push event, we will handle it as a regular command, and so we will delete the handler and won't resend the command. Also, Here the pending commands list is being cleared always after we try to send the commands on reconnection, but we never confirm that they were sent and received, and they will be lost in case something went wrong.
Send guaranteed command is working based on regular send command, just that it is sent only when the connection is available, but if the connection is dropped before we receive the related push event, we will handle it as a regular command, and so we will delete the handler and won't resend the command. Also, Here the pending commands list is being cleared always after we try to send the commands on reconnection, but we never confirm that they were sent and received, and they will be lost in case something went wrong.