[ https://issues.apache.org/jira/browse/THRIFT-2539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14013668#comment-14013668 ]
Randy Abernethy commented on THRIFT-2539: ----------------------------------------- Hi Michal, Thanks for the patch, looks good mechanically. I am concerned about the implementation though. What I think we should try for here is the thing least likely to impact other users. AI_ADDRCONFIG can be pretty important given the adoption of RFC 3493 and other factors, so I don't think we should just throw it out. Something like: {code} error = getaddrinfo(host_.c_str(), port, &hints, &res0); if (error) { hints.ai_flags = AI_PASSIVE; error = getaddrinfo(host_.c_str(), port, &hints, &res0); } {code} and/or perhaps testing host for "localhost". If this sort of thing works in your use case I think we can move forward. Best, Randy > Tsocket.cpp addrinfo ai_flags = AI_ADDRCONFIG > --------------------------------------------- > > Key: THRIFT-2539 > URL: https://issues.apache.org/jira/browse/THRIFT-2539 > Project: Thrift > Issue Type: Question > Affects Versions: 0.9.1 > Reporter: MichaĆ Gazda > Assignee: Randy Abernethy > Attachments: THRIFT-2539-my-new-feature.patch, TSocket.cpp > > > While creating and using thrift based app we have found some problem on > windows 7 which was not present on winxp. When we try to open socket with > local_open() for the host name "localhost" getaddrinfo fails with 11004. What > is important we do not have any physical network address as all network cards > are disabled in the system. As I assume it is connected wit he flag > AI_ADDRCONFIG. Why it is set by default? I wonder if I do remove it can it > cause some problems? I would like our app to be able to communicate locally > even if there is no external network available. > Hope to get quick reply, thank you. -- This message was sent by Atlassian JIRA (v6.2#6252)