Skip to content

Commit b523d24

Browse files
ci(pre-commit): Apply automatic fixes
1 parent 6e8d674 commit b523d24

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Diff for: libraries/WebServer/src/Parsing.cpp

+9-7
Original file line numberDiff line numberDiff line change
@@ -345,23 +345,25 @@ void WebServer::_uploadWriteByte(uint8_t b) {
345345

346346
int WebServer::_uploadReadByte(NetworkClient &client) {
347347
int res = client.read();
348-
348+
349349
if (res < 0) {
350350
// keep trying until you either read a valid byte or timeout
351351
const unsigned long startMillis = millis();
352352
const long timeoutIntervalMillis = client.getTimeout();
353353
bool timedOut = false;
354-
for(;;) {
355-
if (!client.connected()) return -1;
354+
for (;;) {
355+
if (!client.connected()) {
356+
return -1;
357+
}
356358
// loosely modeled after blinkWithoutDelay pattern
357-
while(!timedOut && !client.available() && client.connected()){
359+
while (!timedOut && !client.available() && client.connected()) {
358360
delay(2);
359361
timedOut = (millis() - startMillis) >= timeoutIntervalMillis;
360362
}
361363

362364
res = client.read();
363-
if(res >= 0) {
364-
return res; // exit on a valid read
365+
if (res >= 0) {
366+
return res; // exit on a valid read
365367
}
366368
// NOTE: it is possible to get here and have all of the following
367369
// assertions hold true
@@ -377,7 +379,7 @@ int WebServer::_uploadReadByte(NetworkClient &client) {
377379

378380
timedOut = (millis() - startMillis) >= timeoutIntervalMillis;
379381
if (timedOut) {
380-
return res; // exit on a timeout
382+
return res; // exit on a timeout
381383
}
382384
}
383385
}

0 commit comments

Comments
 (0)