Open l-sannin opened 4 years ago
Sorry for late reply.
Let's me explain about the "keepConn", you don't see it in Ai-thinker's code samples, right?
Actually, I've modified the http-related methods to keep the connection, using flag "keepConn". By doing that, the data is pushed to server faster. Because, the loop of "open connection->send data->get-response ->close connection" takes long time and CPU. And since we don't need the server's response (I think ;) ), I've removed the code of reading response.
I think that trick makes the connection to be like websocket (one-way, indeed).
About this issue, I think, maybe it's related to Carrier's policy. May Carrier doesn't let you connect to server for long time (i'm not sure). You can apply code from Ai-thinker and test if the issue is gone.
Many thanks.
Hello, The tcp connection its not closing properly and this affects the server functionality, you need to close the connection as i see on your code, I have do that to solve the issue. Regards
My friend faced this problem too. It seems we need to close the connection. Thank you for reporting.
Sorry for late reply.
Let's me explain about the "keepConn", you don't see it in Ai-thinker's code samples, right?
Actually, I've modified the http-related methods to keep the connection, using flag "keepConn". By doing that, the data is pushed to server faster. Because, the loop of "open connection->send data->get-response ->close connection" takes long time and CPU. And since we don't need the server's response (I think ;) ), I've removed the code of reading response.
I think that trick makes the connection to be like websocket (one-way, indeed).
About this issue, I think, maybe it's related to Carrier's policy. May Carrier doesn't let you connect to server for long time (i'm not sure). You can apply code from Ai-thinker and test if the issue is gone.
Many thanks.
Unfortunately, this did not solve the problem. I found the problem but I do not know how to solve it. If the process "open connection-> send data-> get-response -> close connection" If it is complete, it will regroup again, only it will happen later. The problem is that the number of geolocation ships will reach a certain number. There is no problem with the connection time to the server either, because I tried to manually send the geographical location to the server. There was no problem. The module itself hangs and does not show any activity. I guess maybe the a variable overflows, which causes the module to stop.
Anyway I could not fix the problem if you can help
Hello I have foud some issues on reports, afeter some time, stop to work seem's to be on this part
` Trace(1, "Socket sending OK! connId=%d, URL=%s",fd, url); keepConn = true; //close(fd); return 1; }
void Http_Close_Conn() { keepConn = false; if (fd >= 0) { close(fd); } }
`