From 61a47fd81cd87b7089e95c020d95efb7c310c4e5 Mon Sep 17 00:00:00 2001 From: bol-van Date: Wed, 27 Mar 2024 19:55:00 +0300 Subject: [PATCH] tpws: do not use split if split pos at the end of the buffer --- tpws/tpws_conn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tpws/tpws_conn.c b/tpws/tpws_conn.c index f17455b..6eba587 100644 --- a/tpws/tpws_conn.c +++ b/tpws/tpws_conn.c @@ -1076,7 +1076,7 @@ static bool handle_epoll(tproxy_conn_t *conn, struct tailhead *conn_list, uint32 conn->tnrd++; conn->trd+=rd; - if (split_pos && bs= 0) { conn->partner->twr += wr; - wr = send_or_buffer_oob(conn->partner->wr_buf + 1, conn->partner->fd, buf + split_pos, bs - split_pos, 0, false); + wr = send_or_buffer(conn->partner->wr_buf + 1, conn->partner->fd, buf + split_pos, bs - split_pos, 0, 0); DBGPRINT("send_or_buffer(2) fd=%d wr=%zd err=%d",conn->partner->fd,wr,errno) if (wr>0) conn->partner->twr += wr; }