This code path is executed by both clients (`connect`) and servers (`bind`), but I think that we only want this as part of `bind`, could you move the logic into the `bind` function of the `TcpListener`?