When retrieving SO_ERROR via getsockopt(), hold the socket lock around
the retrieval and replacement with 0. MFC after: 1 week
This commit is contained in:
parent
374a73f6b1
commit
350dce4037
@ -2180,8 +2180,10 @@ integer:
|
||||
goto integer;
|
||||
|
||||
case SO_ERROR:
|
||||
SOCK_LOCK(so);
|
||||
optval = so->so_error;
|
||||
so->so_error = 0;
|
||||
SOCK_UNLOCK(so);
|
||||
goto integer;
|
||||
|
||||
case SO_SNDBUF:
|
||||
|
Loading…
x
Reference in New Issue
Block a user