mirror of
https://github.com/apache/thrift.git
synced 2026-10-29 08:55:16 +08:00
Android restricts use of AI_V4MAPPED flag.
Client: cpp Patch: Ruslan <thgall@mail.ru> This closes #2406
This commit is contained in:
1 parent
58fa7b4610
commit
ab72ebe564
1 file changed
+4
@@ -404,7 +404,11 @@ void TServerSocket::listen() {
|
||||
if (tcp) {
|
||||
try {
|
||||
resolved_addresses.resolve(address_, std::to_string(port_), SOCK_STREAM,
|
||||
#ifdef ANDROID
|
||||
AI_PASSIVE | AI_ADDRCONFIG);
|
||||
#else
|
||||
AI_PASSIVE | AI_V4MAPPED);
|
||||
#endif
|
||||
} catch (const std::system_error& e) {
|
||||
GlobalOutput.printf("getaddrinfo() -> %d; %s", e.code().value(), e.what());
|
||||
close();
|
||||
|
||||
Reference in new issue
Block a user