chenBright opened a new pull request, #1818: URL: https://github.com/apache/incubator-brpc/pull/1818
使用Channel::Init("http://hostname", options)时,会在hostname2ip中通过gethostbyname_r获取dns的节点信息。如果hostname在dns中配置了很多节点,hostname2ip会因为aux_buf长度不够导致调用失败,从而导致Channel::Init失败。 解决方法:参考DomainNamingService获取节点信息的方法,当gethostbyname_r返回ERANGE,表示aux_buf长度不足时,将aux_buf长度增大一倍,重新调用gethostbyname_r获取节点信息,直到获取成功为止。 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org