net: sockets: Handle EINTR return from k_poll()
In 90b471fe4, there was a change to make k_poll() return EINTR error if it was cancelled with k_fifo_cancel_wait(). Handle this change, or otherwise sockets EOF handling was broken. Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
parent
3689107b59
commit
21f31e90ec
@ -303,7 +303,8 @@ static inline ssize_t zsock_recv_stream(struct net_context *ctx,
|
||||
}
|
||||
|
||||
res = _k_fifo_wait_non_empty(&ctx->recv_q, timeout);
|
||||
if (res && res != -EAGAIN) {
|
||||
/* EAGAIN when timeout expired, EINTR when cancelled */
|
||||
if (res && res != -EAGAIN && res != -EINTR) {
|
||||
errno = -res;
|
||||
return -1;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user