Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 33938af7 authored by Alexandre Bailon's avatar Alexandre Bailon
Browse files

comtroller: exit the recv thread in the case of error


When an error happen during a read operation,
the thread continuously try to read again, and break down the performances.
If something is going wrong during a read operation,
exit the thread instead of trying to read again.

Signed-off-by: default avatarAlexandre Bailon <abailon@baylibre.com>
parent 32b56486
Branches
Tags
No related merge requests found
......@@ -265,7 +265,12 @@ void *connection_recv(void *data)
ret = ctrl->read(conn, buffer, GB_NETLINK_MTU);
if (ret < 0) {
pr_err("Failed to read data: %d\n", ret);
continue;
break;
}
if (ret == 0) {
pr_err("Read is expected to be blocking!\n");
break;
}
pr_dump(buffer, ret);
......
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