I tried your branch and it didn't reconnect after restarting my doorbell.
I have added some more error codes to retry on which I found when playing round turning off wifi on my laptop and disconnecting the doorbell from my network.
I have also changed the logic so it has a maximum delay rather than resetting back to 10ms as I think this is more standard in backoff type logic.
@HarryEMartland done! Please check it: https://github.com/agsh/onvif/pull/320
If everything is ok, I'll make a release and publish a new version in the NPM.
I tried your branch and it didn't reconnect after restarting my doorbell.
I have added some more error codes to retry on which I found when playing round turning off wifi on my laptop and disconnecting the doorbell from my network.
I have also changed the logic so it has a maximum delay rather than resetting back to 10ms as I think this is more standard in backoff type logic.