Commit 7ccf870
net: coap_client: Stop all socket activities when cancelling requests
Calling coap_client_cancel_requests() clears the internal request
context only for active requests (i. e. not replied yet). However,
if there are any pending request context monitoring ACK duplicates,
those would still make the corresponding client socket being monitored
by poll(). In result, when application closes the socket, the polling
thread will throw POLLNVAL error for the socket.
Fix this, by resetting all request contexts unconditionally. The request
callback will only be called for the active requests.
Signed-off-by: Robert Lubos <[email protected]>1 parent 3f81e81 commit 7ccf870
File tree
2 files changed
+6
-6
lines changed- include/zephyr/net
- subsys/net/lib/coap
2 files changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
160 | 162 | | |
161 | 163 | | |
162 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1013 | 1013 | | |
1014 | 1014 | | |
1015 | 1015 | | |
1016 | | - | |
1017 | 1016 | | |
1018 | | - | |
1019 | | - | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
1020 | 1020 | | |
1021 | | - | |
1022 | | - | |
1023 | | - | |
| 1021 | + | |
1024 | 1022 | | |
1025 | 1023 | | |
1026 | 1024 | | |
| |||
0 commit comments