Closed bakadave closed 1 year ago
I don't know what happens when server.begin() of Ethernet library is called again. it will try to create a new server with the same port and I don't know if it ends with error or if it creates it and how will it then behave.
Thank you. I'm not familiar enough with these libs to figure it out on my own but I'm happy to help if you give me some pointers.
Workaround until the answer is found: in case of ethernet disconnect I restart the microcontroller and wait for a normal ethernet connection to be estabilished. Once ethernet is (re)estabilished ArduinoOTA.begin()
is called (only once).
This avoids the undefined behaviour detailed above.
I'm trying to handle ethernet disconnection scenarios, however if I try to call
ArduinoOTA.end()
compiler returns with error:class EthernetServer' has no member named 'stop'
Upon closer inspection it looks like EthernetServer does not have a
stop()
method afterall. What is the recommended way to proceed? What happens if I never callend()
? Should I callbegin()
after reconnection?