Skip to content

Commit

Permalink
[kernel] Handle timeout
Browse files Browse the repository at this point in the history
OTP-19063
  • Loading branch information
bmk committed May 21, 2024
1 parent 640b852 commit daa5bbf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/kernel/src/socket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -3440,6 +3440,8 @@ recv(?socket(SockRef), Length, Flags, Timeout)
case prim_socket:recv(SockRef, Length, Flags, zero) of
ok ->
{error, timeout};
timeout ->
{error, timeout};
Result ->
Result
end;
Expand Down Expand Up @@ -3838,6 +3840,8 @@ recvfrom(?socket(SockRef), BufSz, Flags, Timeout)
case prim_socket:recvfrom(SockRef, BufSz, Flags, zero) of
ok ->
{error, timeout};
timeout ->
{error, timeout};
Result ->
recvfrom_result(Result)
end;
Expand Down Expand Up @@ -4137,6 +4141,8 @@ recvmsg(?socket(SockRef), BufSz, CtrlSz, Flags, Timeout)
case prim_socket:recvmsg(SockRef, BufSz, CtrlSz, Flags, zero) of
ok ->
{error, timeout};
timeout ->
{error, timeout};
Result ->
recvmsg_result(Result)
end;
Expand Down

0 comments on commit daa5bbf

Please sign in to comment.