Skip to content

Synchronise stop listening operation for multi-layer transports

Artem Boldariev requested to merge artem-sync-multilayer-stoplistening into main

This commit introduces a primitive isc__nmsocket_stop() which performs shutting down on a multilayered socket ensuring the proper order of the operations.

The shared data within the socket object can be destroyed after the call completed, as it is guaranteed to not be used from within the context of other worker threads.

This fix has a potential to fix some weird behaviour in TLS/DoH unit tests as well as the weird bug reported by TSAN related to a TLS context being accessed by multiple threads on destruction (provided that it is not a false positive).

Closes #3606 (closed)

Edited by Artem Boldariev

Merge request reports