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:
return
try:
await asyncio.wait_for(
asyncio.wait({e.wait() for e in dhcp_events}),
10)
except asyncio.TimeoutError:
pass
for dev, v in dhcp_device_versions:
dev.dhcp_events = {}