This commit is contained in:
Gilles Boccon-Gibod
2024-07-25 12:46:05 -07:00
parent de7b99ce34
commit f3b776c343
15 changed files with 1983 additions and 1037 deletions

View File

@@ -264,7 +264,9 @@ class BaseSource:
self.sink = sink
def on_transport_lost(self) -> None:
self.terminated.set_result(None)
if not self.terminated.done():
self.terminated.set_result(None)
if self.sink:
if hasattr(self.sink, 'on_transport_lost'):
self.sink.on_transport_lost()