interface: if iface conn fails early, don't wait for timeout of 'ready'

Network code is waiting for iface.ready with a timeout.
While network.py code is waiting, the already failed iface takes up a slot
in "connecting".
This commit is contained in:
SomberNight 2019-03-18 21:34:01 +01:00
parent a2f477b679
commit 3b1ece4c70
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9

View file

@ -299,6 +299,8 @@ class Interface(PrintError):
finally:
await self.network.connection_down(self)
self.got_disconnected.set_result(1)
# if was not 'ready' yet, schedule waiting coroutines:
self.ready.cancel()
return wrapper_func
@ignore_exceptions # do not kill main_taskgroup