Closed tautologyclub closed 2 weeks ago
Seems like handle_poll() should simply return negative here, right?
Not sure if we should do that specifically, theoretically we can have multiple clients communicating over different sockets, doing this would stall the communication for every other client. Plus this will not report any error to the application.
I think that if a particular socket starts to report errors during poll, we should just close any active requests for the client that owns the socket. We currently have coap_client_cancel_requests()
that could be used here, but perhaps we should generalize the function to allow to report other error codes, like ECONNABORTED or so.
@tautologyclub Has this been fixed? Can this issue be closed?
Running
3.5.99-ncs1
(Nordic fork). We're gettingZSOCK_POLLERR
according to logs. Snippet fromhandle_poll()
:so it simply returns 0. Then in
coap_client_recv()
:So
handle_poll()
returns 0, butclients[i]->response_ready
is not true. Supposedlyhas_ongoing_requests()
is still true though. This leads to a tight loop which it never escapes from.Seems like
handle_poll()
should simply return negative here, right? If I get some input from @juhaylinen or some CODEOWNER (@rlubos ? @jukkar ?) I can submit a patch.For the record, this has been observed empirically, when our LTE connection died at some inopportune moment.