mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-26 22:13:26 +01:00
If IPv6 fails, print something and try IPv4.
This commit is contained in:
parent
d232538317
commit
6089f02d57
@ -98,6 +98,11 @@ static Tox *init_tox(int ipv4)
|
||||
int ipv6 = !ipv4;
|
||||
Tox *m = tox_new(ipv6);
|
||||
|
||||
if (TOX_ENABLE_IPV6_DEFAULT && m == NULL) {
|
||||
fprintf(stderr, "IPv6 didn't initialize, trying IPv4 only\n");
|
||||
m = tox_new(0);
|
||||
}
|
||||
|
||||
if (m == NULL)
|
||||
return NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user