Skip to content

Commit b4d35eb

Browse files
committed
FIX: output buffer tail extension must be done only for UDP
related to: Oldes/Rebol-issues#1803
1 parent c5e159b commit b4d35eb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/core/p-net.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,11 @@ enum Transport_Types {
216216

217217
//Print("(max read length %d)", sock->length);
218218
result = OS_DO_DEVICE(sock, RDC_READ); // recv can happen immediately
219-
if (result < 0) Trap_Port(RE_READ_ERROR, port, sock->error);
220-
VAL_TAIL(arg) += sock->actual;
219+
if (GET_FLAG(sock->modes, RST_UDP && result == 0))
220+
VAL_TAIL(arg) += sock->actual;
221+
if (result < 0)
222+
Trap_Port(RE_READ_ERROR, port, sock->error);
223+
221224
break;
222225

223226
case A_WRITE:

0 commit comments

Comments
 (0)