[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #62231] LwIP tcp socket stalls when "plug pulled", cre
From: |
Brendan McDonnell |
Subject: |
[lwip-devel] [bug #62231] LwIP tcp socket stalls when "plug pulled", creates leak when closed |
Date: |
Mon, 1 Jul 2024 20:16:05 -0400 (EDT) |
Follow-up Comment #4, bug #62231 (group lwip):
In further testing, I've found that my proposed solution only works when there
is neither unsent nor unacked data in the TCP PCB. So for instance if the
route between host and server goes down in the middle of an HTTP GET download,
and you try to abort as I described in comment #1, lwIP will try to normal
close the socket (i.e. client sends a FIN and waits for FIN/ACK).
It's this line of code that makes it behave that way:
https://github.com/lwip-tcpip/lwip/blob/62ac0faad804198e00bbcc70f5ff5927e05a5791/src/api/api_msg.c#L985
Can anyone clarify:
- Is this lwIP behavior correct? If so, why?
- How can an application be sure to trigger a TCP RST and immediately free
the socket resources when there are no unsent and unacked data?
(... When my application wants to abort and immediately free the socket
resources, in this scenario, I think my workaround for the moment may be to
add a call to lwip_send() w/ a dummy byte before calling lwip_shutdown() /
lwip_close().)
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/bugs/?62231>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
signature.asc
Description: PGP signature
- [lwip-devel] [bug #62231] LwIP tcp socket stalls when "plug pulled", creates leak when closed,
Brendan McDonnell <=
Message not available
Message not available
Message not available
Message not available
Message not available
Message not available
Message not available
Message not available