Skip to content

WiFiUdp stop() does not release UDP socket #1637

@fpoto

Description

@fpoto

This is apparently a bug, described in some detail at http://forum.arduino.cc//index.php?topic=194991.0.

In short, if I have no problems with this pseudo-code:

begin();
for (;;) {
  sendrequest();
  getreply();
  delay();
}

which has worked reliably for hours with a request every ten seconds, but this one does not work:

for (;;) {
  begin();
  sendrequest();
  getreply();
  stop();
  delay();
}

In this second case, the program correctly receives the first reply, but fails from the second time on. Additionally, it seems that stop() does not deallocate the internal structures, because begin() fails from the fifth time on, meaning that there are no more sockets available.

I can provide an example trimmed down sketch if necessary.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions