diff --git a/components/net/lwip-1.4.1/src/api/api_msg.c b/components/net/lwip-1.4.1/src/api/api_msg.c index d4e44b9ad2..7c58a77bde 100644 --- a/components/net/lwip-1.4.1/src/api/api_msg.c +++ b/components/net/lwip-1.4.1/src/api/api_msg.c @@ -1235,6 +1235,7 @@ do_writemore(struct netconn *conn) /* partial write */ err = ERR_OK; conn->current_msg->msg.w.len = conn->write_offset; + conn->write_offset = 0; } } else #endif /* LWIP_SO_SNDTIMEO */ diff --git a/components/net/lwip-head/src/api/api_msg.c b/components/net/lwip-head/src/api/api_msg.c index f3e4f9a3a7..5442549547 100644 --- a/components/net/lwip-head/src/api/api_msg.c +++ b/components/net/lwip-head/src/api/api_msg.c @@ -1261,6 +1261,7 @@ lwip_netconn_do_writemore(struct netconn *conn) /* partial write */ err = ERR_OK; conn->current_msg->msg.w.len = conn->write_offset; + conn->write_offset = 0; } } else #endif /* LWIP_SO_SNDTIMEO */