Chat freely about anything...

User avatar
By pvvx
#8332
kadamski wrote:I don't know why you mentioned espconn_set_opt, though. ESPCONN_REUSEADDR does not seem to fix this issue for me. Can you explain?

Code: Select allstatic void ICACHE_FLASH_ATTR espconn_tcp_disconnect_successful(void *arg)
{
....
         /*delete TIME_WAIT State pcb after 2MSL time,for not all data received by application.*/
         if (pdiscon_cb->pcommon.espconn_opt == ESPCONN_REUSEADDR){
               tcp_pcb_remove(&tcp_tw_pcbs,pcb);
               memp_free(MEMP_TCP_PCB,pcb);
            }
         }
...
}

Espconn needs a fix:
if the pcb removed (LwIP received disconnect TCP[FIN] and deletes pcb), then do nothing.
For this we need to have: local and remote IP + port. Using local and remote IP + port can be found or not current pcb in list LwIP.
Similarly in all espconn_send(s)... otherwise the output falls into another connection. (с) Espressif :lol:

kadamski wrote: If Espressif is fixing bugs and adding new features it its lwip implementation,then it would be best to have common code base that they could maintain, instead of relaying on some old code.
Espressif is engaged in the addition of new bugs and expectations fixes from you. New LwIP they not write.
User avatar
By alonewolfx2
#8344 AT source closed, lwip source closed. What's next :)
I am waiting for freertos update.