Merge pull request #616 from mwhudson/network-timeout-fix

fix case where NIC does not get DHCP address
This commit is contained in:
Michael Hudson-Doyle 2019-12-19 16:19:17 +13:00 committed by GitHub
commit e718a4391d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -417,9 +417,12 @@ class NetworkController(BaseController):
if not dhcp_events: if not dhcp_events:
return return
await asyncio.wait_for( try:
asyncio.wait({e.wait() for e in dhcp_events}), await asyncio.wait_for(
10) asyncio.wait({e.wait() for e in dhcp_events}),
10)
except asyncio.TimeoutError:
pass
for dev, v in dhcp_device_versions: for dev, v in dhcp_device_versions:
dev.dhcp_events = {} dev.dhcp_events = {}