Added 1 second timeout to read data in readLine#104
Merged
gilmaimon merged 3 commits intogilmaimon:masterfrom Jul 29, 2021
Merged
Added 1 second timeout to read data in readLine#104gilmaimon merged 3 commits intogilmaimon:masterfrom
gilmaimon merged 3 commits intogilmaimon:masterfrom
Conversation
gilmaimon
requested changes
May 1, 2021
Owner
gilmaimon
left a comment
There was a problem hiding this comment.
Hi, sorry for the delay.
I posted some review comments on the code, once those will be refactored I'll merge :)
src/tiny_websockets/network/generic_esp/generic_esp_clients.hpp
Outdated
Show resolved
Hide resolved
src/tiny_websockets/network/generic_esp/generic_esp_clients.hpp
Outdated
Show resolved
Hide resolved
Contributor
Author
|
@gilmaimon please check the new changes as per your review :) |
gilmaimon
requested changes
Jun 25, 2021
|
|
||
| uint64_t millisBeforeReadingHeaders = millis(); | ||
| while( ch != '\n' && available()) { | ||
| if ( millis() - _timer > readLineTimeout) return ""; |
Owner
There was a problem hiding this comment.
I assume you need to remove this line?
Contributor
Author
There was a problem hiding this comment.
My apologies I pushed the wrong commit, this was supposed to be removed
|
|
||
| int ch = -1; | ||
|
|
||
| uint64_t millisBeforeReadingHeaders = millis(); |
Owner
There was a problem hiding this comment.
const uint64_t millisBeforeReadingHeaders
|
|
||
| int ch = -1; | ||
|
|
||
| uint64_t millisBeforeReadingHeaders = millis(); |
Owner
There was a problem hiding this comment.
const uint64_t millisBeforeReadingHeaders
Contributor
Author
|
2nd pass of reviews added |
Owner
|
Thanks, merged! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A simple 1 second connection timeout limit that will abort a connection request if a response is not received in time to address Issue 78. Tested with ESP32