mirror of https://github.com/ericonr/sndio.git
check if writable preparing a DATA packet
This commit is contained in:
parent
25e29a8cf2
commit
f59de2770d
|
@ -1416,7 +1416,7 @@ sock_buildmsg(struct sock *f)
|
|||
/*
|
||||
* If data available, build a DATA message.
|
||||
*/
|
||||
if (f->slot != NULL && f->slot->sub.buf.used > 0 && f->wmax > 0) {
|
||||
if (f->slot != NULL && f->wmax > 0 && f->slot->sub.buf.used > 0) {
|
||||
size = f->slot->sub.buf.used;
|
||||
if (size > AMSG_DATAMAX)
|
||||
size = AMSG_DATAMAX;
|
||||
|
|
Loading…
Reference in New Issue