Skip to content
Snippets Groups Projects
Commit e390d964 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

requestor: do not return EAGAIN for errors when waiting

parent 8a64e3fe
Branches
Tags
No related merge requests found
......@@ -86,9 +86,9 @@ static int request_send(struct request *request, const struct timeval *timeout)
/* Each request has unique timeout. */
struct timeval tv = { timeout->tv_sec, timeout->tv_usec };
/* Wait for writeability. */
/* Wait for writeability or error. */
int ret = request_wait(request->data.fd, NS_PROC_FULL, &tv);
if (ret <= 0) {
if (ret == 0) {
return KNOT_EAGAIN;
}
......
......@@ -242,7 +242,7 @@ int tcp_recv_data(int fd, uint8_t *buf, int len, struct timeval *timeout)
if (ret) {
continue;
} else {
return KNOT_EAGAIN;
return KNOT_EBUSY;
}
} else {
return KNOT_ECONN;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment