Skip to content

Commit

Permalink
FIX: output buffer tail extension must be done only for UDP
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Jul 19, 2022
1 parent c5e159b commit b4d35eb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/p-net.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,11 @@ enum Transport_Types {

//Print("(max read length %d)", sock->length);
result = OS_DO_DEVICE(sock, RDC_READ); // recv can happen immediately
if (result < 0) Trap_Port(RE_READ_ERROR, port, sock->error);
VAL_TAIL(arg) += sock->actual;
if (GET_FLAG(sock->modes, RST_UDP && result == 0))
VAL_TAIL(arg) += sock->actual;
if (result < 0)
Trap_Port(RE_READ_ERROR, port, sock->error);

break;

case A_WRITE:
Expand Down

0 comments on commit b4d35eb

Please sign in to comment.