Check for SS_NBIO in so->so_state instead of sb->sb_flags in
soreceive_stream(). Differential Revision: https://reviews.freebsd.org/D1299 Reviewed by: bz, gnn MFC after: 1 week
This commit is contained in:
parent
80ecdefe46
commit
93ef12f586
@ -1173,7 +1173,7 @@ restart:
|
||||
|
||||
/* Socket buffer got some data that we shall deliver now. */
|
||||
if (sbused(sb) && !(flags & MSG_WAITALL) &&
|
||||
((sb->sb_flags & SS_NBIO) ||
|
||||
((so->so_state & SS_NBIO) ||
|
||||
(flags & (MSG_DONTWAIT|MSG_NBIO)) ||
|
||||
sbused(sb) >= sb->sb_lowat ||
|
||||
sbused(sb) >= uio->uio_resid ||
|
||||
|
@ -2002,7 +2002,7 @@ restart:
|
||||
|
||||
/* Socket buffer got some data that we shall deliver now. */
|
||||
if (sbavail(sb) > 0 && !(flags & MSG_WAITALL) &&
|
||||
((sb->sb_flags & SS_NBIO) ||
|
||||
((so->so_state & SS_NBIO) ||
|
||||
(flags & (MSG_DONTWAIT|MSG_NBIO)) ||
|
||||
sbavail(sb) >= sb->sb_lowat ||
|
||||
sbavail(sb) >= uio->uio_resid ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user