fix(mux): 修复MUX半帧丢失与发送路径静默失败

This commit is contained in:
2026-04-18 18:48:38 +08:00
parent a0b27d34a0
commit 495fbe4298
4 changed files with 225 additions and 78 deletions
+9
View File
@@ -228,15 +228,24 @@ int tcp_server_send(uint8_t instance, const uint8_t *data, uint16_t len)
return -1;
}
if (tcp_sndbuf(ctx->client_pcb) < len) {
ctx->status.errors++;
return 0;
}
err = tcp_write(ctx->client_pcb, data, len, TCP_WRITE_FLAG_COPY);
if (err == ERR_MEM) {
ctx->status.errors++;
return 0;
}
if (err != ERR_OK) {
ctx->status.errors++;
return -1;
}
err = tcp_output(ctx->client_pcb);
if (err == ERR_MEM) {
ctx->status.errors++;
return 0;
}
if (err != ERR_OK) {
ctx->status.errors++;
return -1;