Skip to content

Commit 8a83115

Browse files
PhilippFinke88fabiobaltieri
authored andcommitted
net: sockets: socket_service: Fixed issue that prevented reconfiguration
Once running, a socket service could not be reconfigured (i.e. changing file descriptors and/or events to be polled). This was due to an wrong check at the end of the thread main loop of socket_service_thread that evaluated to false as variable ret is zero if trigger_work(), which is called previously for all returned events, returns successfully. Signed-off-by: Philipp Finke <[email protected]>
1 parent de42b49 commit 8a83115

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/net/lib/sockets/sockets_service.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ static void socket_service_thread(void *p1, void *p2, void *p3)
260260
}
261261

262262
/* Relocate after trigger work so the work gets done before restarting */
263-
if (ret > 0 && ctx.events[0].revents) {
263+
if (ctx.events[0].revents) {
264264
zvfs_eventfd_read(ctx.events[0].fd, &value);
265265
ctx.events[0].revents = 0;
266266
NET_DBG("Received restart event.");

0 commit comments

Comments
 (0)