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”
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.
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 ?