mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-19 04:57:53 +00:00
Give up to a second for the interface to appear to assign IP addresses
This commit is contained in:
parent
dffbd2113a
commit
203414910f
@ -850,6 +850,10 @@ void LinuxNetLink::addAddress(const InetAddress &addr, const char *iface)
|
||||
#endif
|
||||
|
||||
int interface_index = _indexForInterface(iface);
|
||||
for (int reps = 0; interface_index == -1 && reps < 10; ++reps) {
|
||||
Thread::sleep(100);
|
||||
interface_index == _indexForInterface(iface);
|
||||
}
|
||||
|
||||
if (interface_index == -1) {
|
||||
fprintf(stderr, "Unable to find index for interface %s\n", iface);
|
||||
|
Loading…
Reference in New Issue
Block a user