unix/dgram: don't clear so_error in case of MSG_PEEK
This commit is contained in:
@@ -1440,7 +1440,8 @@ uipc_soreceive_dgram(struct socket *so, struct sockaddr **psa, struct uio *uio,
|
||||
(m = STAILQ_FIRST(&so->so_rcv.uxdg_mb)) == NULL) {
|
||||
if (so->so_error) {
|
||||
error = so->so_error;
|
||||
so->so_error = 0;
|
||||
if (!(flags & MSG_PEEK))
|
||||
so->so_error = 0;
|
||||
SOCK_RECVBUF_UNLOCK(so);
|
||||
SOCK_IO_RECV_UNLOCK(so);
|
||||
return (error);
|
||||
|
||||
Reference in New Issue
Block a user