[email protected] wrote
I have a question regarding accepting client PCBs on a listening PCB:
Is it by design that the stack aborts an already connected PCB, if it fails to
allocate a free TCP PCB from the memory pools to handle pending connection
requests?
Yes, that's by design. Note that pcbs have a priority (pcb->prio) and
only connections that have a lower priority (value) than the newly
allocated pcb will be closed.
One could argue though, whether this check should be changed from
'old_prio <= new_prio' to 'old_prio < new_prio'. However, this would
break existing applications relying on this behaviour.
How do I protect my existing connections in this 'out of memory' situation?
If you don't want them to get aborted, set the priority higher than the
priority of the listening pcb.
I'm using RAW API 1.4.1 with memory pools enabled and backlog disabled.
Hmm... lwIP 1.4.1 has not been 'officially' released, yet. I think I
tagged the git repository, though...
Simon
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users