On Wed, Apr 12, 2023 at 01:10:40AM +0700, Robert Elz wrote:
>
> | In that state then decrementing dk_rawopens beyond zero will make
> | dklastclose do the right thing: nothing.
>
> Except that if that happens, dk_rawopens will be left == ~0 and the next
> open attempt will then increment it, back to 0 again, which is almost
> certainly not what was wanted.
>
> dklastclose() used to have code in it like
>
> if (...->dk_rawopens > 0) {
> if (--...->dk_rawopens == 0)
Indeed, that part was simplified away.
--
Michael van Elst
Internet: [email protected]
"A potential Snark may lurk in every tree."