We need to mark the socket as inactive early (and synchronously) in the stoplistening process - otherwise we might destroy the callback argument before actually stopping listening, and call the callback on a bad memory.
We need to mark the socket as inactive early (and synchronously) in the stoplistening process - otherwise we might destroy the callback argument before actually stopping listening, and call the callback on a bad memory.