On Thu, Mar 15, 2018 at 02:49:59PM +0100, Christopher Faulet wrote: > When we scan a queue, it is locked. So on your mark, the server queue is > already locked. To remove a pendconn from a queue, we also need to have a > lock on this queue, if it is still linked. Else we can safely remove it, > nobody can fall on the pendconn by scanning the queue.
OK that's exactly the information I was missing, so I think all is good then! > In fact without locking the queue (server one and/or proxy one), it is > unsafe to loop on it. In same way, we must lock the queue to remove a > pendconn from it. I will add comments to clarify everything. But, I really > think it is thread-safe. Absolutely. Thanks for the detailed explanation! Willy