labath added a comment.

Getaddrinfo documentation says:

  Normally,  the  application
  should  try  using the addresses in the order in which they are returned.  
The sorting function
  used within getaddrinfo() is defined in RFC 3484; the order can be  tweaked  
for  a  particular
  system by editing /etc/gai.conf (available since glibc 2.5).

I don't like when apps question or try to override system settings. And 
preferring ipv4 seems rather backward-looking.

So, IIUC, the problem is that adb only listens on the ipv4 loopback address 
(and that windows takes 2 seconds to reject a loopback connection). Is that 
correct? Where do the addresses that we're connecting to come from (the user or 
lldb code)? If it's lldb code, maybe we could just replace the relevant 
"localhost" names with an explicit ipv4 loopback address?

Also, have you looked at the possibility of reducing the number of adb 
connections we make? My memory of adb is fairly hazy, but I do remember that 
some queries result in immediate connection termination. Still, five 
connections seems like too much...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79757/new/

https://reviews.llvm.org/D79757



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to