|
|
|
|
@ -375,6 +375,7 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags)
|
|
|
|
|
err_t err; |
|
|
|
|
/* don't allocate segments bigger than half the maximum window we ever received */ |
|
|
|
|
u16_t mss_local = LWIP_MIN(pcb->mss, pcb->snd_wnd_max/2); |
|
|
|
|
mss_local = mss_local ? mss_local : pcb->mss; |
|
|
|
|
|
|
|
|
|
#if LWIP_NETIF_TX_SINGLE_PBUF |
|
|
|
|
/* Always copy to try to create single pbufs for TX */ |
|
|
|
|
|