Skip to content

Commit

Permalink
Merge pull request #1878 from ogayot/console-conf-network-crash
Browse files Browse the repository at this point in the history
network: ensure we pass tasks to asyncio.wait
  • Loading branch information
ogayot authored Dec 12, 2023
2 parents 93ab4f9 + 0b7a4d1 commit ea909d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion subiquity/server/controllers/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ async def wait_for_initial_config(self, context):
with context.child("wait_dhcp"):
try:
await asyncio.wait_for(
asyncio.wait({e.wait() for e in dhcp_events}), 10
asyncio.wait({asyncio.create_task(e.wait()) for e in dhcp_events}),
10,
)
except asyncio.TimeoutError:
pass
Expand Down
4 changes: 3 additions & 1 deletion subiquitycore/controllers/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,9 @@ def error(stage):
return

try:
await asyncio.wait_for(asyncio.wait({e.wait() for e in dhcp_events}), 10)
await asyncio.wait_for(
asyncio.wait({asyncio.create_task(e.wait()) for e in dhcp_events}), 10
)
except asyncio.TimeoutError:
pass

Expand Down

0 comments on commit ea909d1

Please sign in to comment.