Skip to content

Commit 74420db

Browse files
authored
1 parent ca8ac5f commit 74420db

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/AsyncTCP.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,9 +1017,12 @@ size_t AsyncClient::write(const char* data) {
10171017

10181018
size_t AsyncClient::write(const char* data, size_t size, uint8_t apiflags) {
10191019
size_t will_send = add(data, size, apiflags);
1020-
if(!will_send || !send()) {
1020+
if (!will_send) {
10211021
return 0;
10221022
}
1023+
while (connected() && !send()) {
1024+
taskYIELD();
1025+
}
10231026
return will_send;
10241027
}
10251028

0 commit comments

Comments
 (0)