Skip to content

Commit

Permalink
Improve HTTP success rates in rare cases of slow starts
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyparrish committed Oct 3, 2024
1 parent 024631e commit ec514ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firmware/http.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static inline void write_request(const char* server, uint16_t port,

static inline bool read_response_headers(HeaderData* header_data) {
int num_read = -1;
while (num_read <= 0 && client->connected()) {
while (num_read <= MIN_RESPONSE_LENGTH && client->connected()) {
num_read = client->read((uint8_t*)response_buffer, sizeof(response_buffer));
}

Expand Down

0 comments on commit ec514ad

Please sign in to comment.