mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-07 19:10:25 +00:00
Adopting a pre-bound socket via SetReservedListenSocket left Worker()'s port bookkeeping untouched, so GetPort() and the broadcast announcement reported the computed default instead of the port the socket listens on. The monitor kept this correct by mirroring the reserved port into TRACY_PORT; direct users of the public API had no such coupling. The bound socket is now authoritative: Worker() reads the local port back via getsockname after binding. The search-loop bookkeeping stays only as a fallback for a getsockname failure.