8000 WiFiTelnetToSerial Example - Minor Issues · Issue #2435 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content
WiFiTelnetToSerial Example - Minor Issues #2435
Closed
@nameoftherose

Description

@nameoftherose

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();
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0