|
From: | address@hidden |
Subject: | Re: [lwip-users] Raw TCP, intermittent long delays in accept after after close |
Date: | Thu, 20 Oct 2022 21:53:20 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 |
Am 20.10.2022 um 20:22 schrieb Geoff Simmons:
[..] When the server is ready to close, it calls tcp_close(); if tcp_close() does not return ERR_OK, it calls tcp_abort(). If it was tcp_abort(), then tcp_arg and the tcp_poll and tcp_err callbacks are retained. tcp_poll or tcp_err then initiate finalizing the pcb. Otherwise (tcp_close() succeeded), the pcb is finalized right away. The pcb is finalized by setting tcp_arg and all of the callbacks to NULL.
See these comments on tcp_abort: "The pcb is deallocated" and "ATTENTION: When calling this from one of the TCP callbacks, make sure you always return ERR_ABRT (and never return ERR_ABRT otherwise or you will risk accessing deallocated memory or memory leaks!" This might indicate a use-after-free error after your tcp_abort calls? Regards, Simon
[Prev in Thread] | Current Thread | [Next in Thread] |