Skip to content

Commit

Permalink
teamd: usock: set nowait flag to recv
Browse files Browse the repository at this point in the history
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
  • Loading branch information
jpirko committed Mar 29, 2013
1 parent c8610b0 commit cb2dc9d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion teamd/teamd_usock.c
Expand Up @@ -193,9 +193,13 @@ static int callback_usock_acc_conn(struct teamd_context *ctx, int events,
return -ENOMEM;
}
ptr = ptr ? ptr + BUFLEN_STEP : buf;
len = recv(acc_conn->sock, ptr, BUFLEN_STEP, 0);
len = recv(acc_conn->sock, ptr, BUFLEN_STEP, MSG_DONTWAIT);
switch (len) {
case -1:
if (errno == EAGAIN) {
len = 0;
break;
}
free(buf);
teamd_log_err("usock: Failed to receive data from connection.");
return -errno;
Expand Down

0 comments on commit cb2dc9d

Please sign in to comment.