Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion libraries/ESP8266WiFi/src/include/ClientContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -447,11 +447,13 @@ class ClientContext
}
err_t err = tcp_write(_pcb, buf, next_chunk, TCP_WRITE_FLAG_COPY);
DEBUGV(":wrc %d %d %d\r\n", next_chunk, will_send, (int) err);
_datasource->release_buffer(buf, next_chunk);
if (err == ERR_OK) {
_datasource->release_buffer(buf, next_chunk);
_written += next_chunk;
need_output = true;
} else {
// ERR_MEM(-1) is a valid error meaning
// "come back later". It leaves state() opened
break;
}
will_send -= next_chunk;
Expand Down