Try something like this (as a test, not a proposed solution):

err_t myrecv(void *arg, struct tcp_pcb* pcb, struct pbuf *p, err_t err)
{
        if ((p == NULL) || (err != ERR_OK)){
                call to tcp_close()
                return ERR_OK;
        }
        tcp_recved(pcb, p->tot_len);
        pbuf_free(p);
        do your stuff but do not call tcp_close()
        return ERR_OK;

And see what happens.

Are you running 1.4.1 (where did you get it from ?) or git head ?


_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to