[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] tcp_recv callback called with pcb->state == FIN_WAIT_1/2 -i
From: |
Domen Puncer |
Subject: |
[lwip-users] tcp_recv callback called with pcb->state == FIN_WAIT_1/2 -is this intentional? |
Date: |
Mon, 17 Aug 2009 15:18:10 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello!
lwIP-1.3.1-rc3
I have a rawapi setup where lwip sends a request, and then receives a
reply with size ~100kB, it forwards this reply via other means to
device3 while it's still transferring via lwip, and if the transfer
to device3 fails, it tcp_close()s the tcp connection too.
Now, I'd expect tcp_recv callback to not be called again, but in fact
it is, first time with FIN_WAIT_1, then with FIN_WAIT_2.
Is this how it's supposed to work?
Currently my "solution is":
/* drop packets when we're closing the connection */
if (pcb->state != ESTABLISHED) {
printf("%s:%i data:%p, pcb:%p, p:%p, err:%i, pcb->state:%i\n",
__func__, __LINE__,
data, pcb, p, err, pcb->state);
pbuf_free(p);
tcp_recved(pcb, p->tot_len);
return 0;
}
Domen
- [lwip-users] tcp_recv callback called with pcb->state == FIN_WAIT_1/2 -is this intentional?,
Domen Puncer <=