Skip to content

Commit

Permalink
doc: mqtt: Fix incorrect usage of poll()
Browse files Browse the repository at this point in the history
The MQTT docs used K_MSEC() to provide the timeout parameter to poll().
Doing this causes a compilation error as poll() expects it's
third parameter to be of type int, not k_timeout_t.

Signed-off-by: Ben Marsh <[email protected]>
  • Loading branch information
besmarsh authored and dleach02 committed Jan 29, 2024
1 parent b8556d0 commit bef0dc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/connectivity/networking/api/mqtt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ application through the callback function.
fds[0].fd = client_ctx.transport.tcp.sock;
fds[0].events = ZSOCK_POLLIN;
poll(fds, 1, K_MSEC(5000));
poll(fds, 1, 5000);
mqtt_input(&client_ctx);
Expand Down

0 comments on commit bef0dc0

Please sign in to comment.