Skip to content

Timeout rollover problem #7

Description

@cwalger

This timeout math looks like it will not work properly during a millis() rollover.
I think first two lines here should be changed to the last two lines:

//int timeout_at = millis() + _timeout;
//while (!client.available() && timeout_at - millis() < 0) {
unsigned long start = millis();
while (!client.available() && millis() - start < _timeout) {	//millis() - start < ms

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions