Skip to content

Commit

Permalink
Applied me-no-dev#144
Browse files Browse the repository at this point in the history
  • Loading branch information
trycoon authored Jul 5, 2022
1 parent ca8ac5f commit 74420db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/AsyncTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1017,9 +1017,12 @@ size_t AsyncClient::write(const char* data) {

size_t AsyncClient::write(const char* data, size_t size, uint8_t apiflags) {
size_t will_send = add(data, size, apiflags);
if(!will_send || !send()) {
if (!will_send) {
return 0;
}
while (connected() && !send()) {
taskYIELD();
}
return will_send;
}

Expand Down

0 comments on commit 74420db

Please sign in to comment.