mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 14:11:02 +00:00
lwip_sendmsg/tcp: prevent PSH until all iovecs are enqueued
(cherry picked from commit 1b3aaef525
)
This commit is contained in:
parent
fe6e1bd4af
commit
df7485de1c
@ -994,6 +994,10 @@ lwip_sendmsg(int s, const struct msghdr *msg, int flags)
|
||||
((flags & MSG_DONTWAIT) ? NETCONN_DONTBLOCK : 0);
|
||||
|
||||
for (i = 0; i < msg->msg_iovlen; i++) {
|
||||
u8_t apiflags = write_flags;
|
||||
if (i + 1 < msg->msg_iovlen) {
|
||||
apiflags |= NETCONN_MORE;
|
||||
}
|
||||
written = 0;
|
||||
err = netconn_write_partly(sock->conn, msg->msg_iov[i].iov_base, msg->msg_iov[i].iov_len, write_flags, &written);
|
||||
if (err == ERR_OK) {
|
||||
|
Loading…
Reference in New Issue
Block a user