Skip to content

Commit

Permalink
ClientContext:_write_some: release buffer once data really accepted f…
Browse files Browse the repository at this point in the history
…or sending

may fix #1872
  • Loading branch information
d-a-v committed Jan 31, 2018
1 parent 4bafbe5 commit fc93c5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/ESP8266WiFi/src/include/ClientContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,8 @@ 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 {
Expand Down

0 comments on commit fc93c5c

Please sign in to comment.