Skip to content

Compilation fails for end() method #209

Closed

Description

@bakadave

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 call end()? Should I call begin() after reconnection?

Activity

  1. JAndrassy commented on Jul 20, 2023

    @JAndrassy
    Owner

    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.

  2. bakadave commented on Jul 20, 2023

    @bakadave
    Author

    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.

  3. bakadave commented on Jul 21, 2023

    @bakadave
    Author

    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.

  4. Repository owner locked and limited conversation to collaborators on Jul 21, 2023
  5. converted this issue into a discussion #212 on Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions