summaryrefslogtreecommitdiff
path: root/py/makemoduledefs.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-05-29 01:29:48 +1000
committerDamien George <damien.p.george@gmail.com>2019-05-29 01:29:48 +1000
commit019dd84af1e8e9bbdbbb6377c28950d31f05a77c (patch)
tree72be23427497c383d86fa3e1c481ef7153e17c1b /py/makemoduledefs.py
parent734ada3e2980d1bbf5c7a1ea5c624b34be16dfa9 (diff)
extmod/modlwip: Register TCP close-timeout callback before closing PCB.
In d5f0c87bb985ae344014dc2041fbaad5c522f638 this call to tcp_poll() was added to put a timeout on closing TCP sockets. But after calling tcp_close() the PCB may be freed and therefore invalid, so tcp_poll() can not be used at that point. As a fix this commit calls tcp_poll() before closing the TCP PCB. If the PCB is subsequently closed and freed by tcp_close() or tcp_abort() then the PCB will not be on any active list and the callback will not be executed, which is the desired behaviour (the _lwip_tcp_close_poll() callback only needs to be called if the PCB remains active for longer than the timeout).
Diffstat (limited to 'py/makemoduledefs.py')
0 files changed, 0 insertions, 0 deletions