Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

WiFiTelnetToSerial Example - Minor Issues #2435

Closed
nameoftherose opened this issue Aug 25, 2016 · 2 comments
Closed

WiFiTelnetToSerial Example - Minor Issues #2435

nameoftherose opened this issue Aug 25, 2016 · 2 comments
Labels
component: examples level: easy type: bug waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.

Comments

@nameoftherose
Copy link
Contributor

Reference is made to WiFiTelnetToSerial.ino
The loop in lines 55-63 continues even if an available client slot has been found. As a result all empty spots are allocated and spurious New Client messages are produced. I propose that the continue statement in line 61 is replaced by a break.
The statements in lines 65-66 are executed always even if a client spot was previously allocated. As a result, a race condition may arise and an incoming connection rejected. I propose that these statements are executed only when i==MAX_SRV_CLIENTS ie said lines 65-66 are replaced with:

if (i==MAX_SRV_CLIENTS) {
      WiFiClient serverClient = server.available();
      serverClient.stop();
}
@devyte
Copy link
Collaborator

devyte commented Oct 14, 2017

@nameoftherose The code you reference is still there in latest git.
Your changes seem sane to me. Did you test these modifications? If so, could you please make a PR?

@devyte devyte added component: examples level: easy type: bug waiting for feedback Waiting on additional info. If it's not received, the issue may be closed. labels Oct 14, 2017
@nameoftherose
Copy link
Contributor Author

nameoftherose commented Jan 29, 2018

@devyte I am sorry for the delayed response. Indeed I have tested these modifications. I did Pull Request #4256 as requested. Thank You.

devyte pushed a commit that referenced this issue Jan 29, 2018
* WiFiTelnetToSerial Example - Minor Issues #2435

* WiFiTelnetToSerial Example - Minor Issues #2435

Patch to rectify issue #2435
devyte pushed a commit that referenced this issue Jan 29, 2018
* WiFiTelnetToSerial Example - Minor Issues #2435

* WiFiTelnetToSerial Example - Minor Issues #2435

Patch to rectify issue #2435
@devyte devyte closed this as completed Jan 29, 2018
devyte pushed a commit that referenced this issue Mar 18, 2018
* Change argument to Esp.deepSleep from uint32 to uint64 to match SDK, add deepSleepMax based on the cali_proc function per SDK

* SPISlave.end() added

* Nameoftherose patch for Issue #2435 (#4256)

* WiFiTelnetToSerial Example - Minor Issues #2435

* WiFiTelnetToSerial Example - Minor Issues #2435

Patch to rectify issue #2435

* Check that pins needed by Wire are defined at compile-time (#4261)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
component: examples level: easy type: bug waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.
Projects
None yet
Development

No branches or pull requests

2 participants