mharizanov wrote:I am experiencing resets after a 'malloc assert!' error, @pvvx has tracked the issue down to to LWIP releasing connections upon timer expiration in 60 seconds and not upon espconn_disconnect()
see here for his demo of the issue: https://www.youtube.com/watch?v=fAYhE389BbM
He suggests calling a "patch" function to force cleanup, but that doesn't seem to help much in my case.
Any suggestions to handle this in a more elegant way?
http://www.serverframework.com/asynchro ... rvers.html
The server does not have to use disconnect. The client proxy -> have to do disconnect. Proxies do not comply with the standards ...
espconn.h SDK 0.9.4:
enum espconn_option{
ESPCONN_REUSEADDR = 1, // delete TIME_WAIT State pcb
ESPCONN_END
};
But all this does not help do the job properly through espconn. Use Lwip!
transfer files of unknown size -> Chunked transfer encoding http://en.wikipedia.org/wiki/Chunked_transfer_encoding
If(client HTTP/1.1) -> Chunked, data end -> timeout (Waiting for sending disconnect from the client), disconnect -> does not remain TIME_WAIT state pcb. Else (client HTTP/1.0), data end transfer, disconnect... have to remove TIME_WAIT pcb - remove pcb -> errors may occur in the TCP/IP stack ...