aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 78b5a752db..08f47ae62f 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -407,7 +407,7 @@ bool GetMyExternalIP(CNetAddr& ipRet)
void ThreadGetMyExternalIP(void* parg)
{
- // Make this thread recognisable as the message handling thread
+ // Make this thread recognisable as the external IP detection thread
RenameThread("bitcoin-ext-ip");
CNetAddr addrLocalHost;
@@ -1878,7 +1878,9 @@ void static Discover()
}
#endif
- CreateThread(ThreadGetMyExternalIP, NULL);
+ // Don't use external IPv4 discovery, when -onlynet="IPv6"
+ if (!IsLimited(NET_IPV4))
+ CreateThread(ThreadGetMyExternalIP, NULL);
}
void StartNode(void* parg)