3 Replies Latest reply on Apr 1, 2020 9:34 PM by ZhengbaoZ_96

    socket disconnect event missed

    agmi_3321141

      I send a few different types of requests using the http_client (connect -> send requests while connected). I observe that sometimes the socket disconnect callback does not get triggered when internet connection is lost. Instead the requests are flushed successfully, but there is no response. The socket state shows WICED_SOCKET_CONNECTED. After a certain time interval, the requests start timing out. Can you help to figure out how to debug this? I am interested in finding out why the callback is not generated and what can be done to fix it.

        • 1. Re: socket disconnect event missed
          ZhengbaoZ_96

          Hello:

             Does below description mean even connection is broken , but requests are sent to server with success?

          You are expecting a disconnection callback, thus you will not send the requests .

           

          “I observe that sometimes the socket disconnect callback does not get triggered when internet connection is lost. Instead the requests are flushed successfully”

          • 2. Re: socket disconnect event missed
            agmi_3321141

            By flushed successfully I mean that the http_request_flush function returns with WICED_SUCCESS and socket state is WICED_SOCKET_CONNECTED. I can handle the case in application, but I'm interested in knowing why the callback is missed or the socket state is not updated.

            • 3. Re: socket disconnect event missed
              ZhengbaoZ_96

              Hello:

               

                  I want to know if the connection is stopped in a normal way as http_server side disassociates the connection by itself,   but the physical connection distance is keeping,  then to see if the disconnection callback is triggered or not.   In other words if we just carry the board to go away from the connection, http servers should have no ability to send the disconnection event to client side.  Then there should have some timeouts in client side,  after a while the application knows the connection is broken, but not reported from server side .  Is that correct from your phenomenon ?