labath accepted this revision. labath added a comment. This revision is now accepted and ready to land.
In D133393#3775995 <https://reviews.llvm.org/D133393#3775995>, @rupprecht wrote: > In D133393#3773793 <https://reviews.llvm.org/D133393#3773793>, @labath wrote: > >> I believe the reasons are still relevant. Basically the problem is that >> listening on `localhost:x` creates two sockets (one for 127.0.0.1, one for >> ::1), and there's no way to guarantee that we'll be able to grab the same >> port for both (one could be taken by some other application). Our listening >> code will succeed if it opens at least one socket, but then if we again try >> to connect using the `localhost` name, we may end up connecting to the wrong >> thing. I think the correct fix is to take the address (ip+port) that we've >> *actually* started listening on, and then pass *that* as the argument to the >> connect command, but I'm not sure if our current Socket APIs allow you to >> get that information. > > There's `listen_socket.GetLocalIPAddress()`, but that returns an empty string > here. Yeah, that probably only works on connected sockets. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133393/new/ https://reviews.llvm.org/D133393 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits