Skip to content

Commit 3af0092

Browse files
committed
streaming callback shouldn't be async
it won't be awaited properly schedule with `ensure_future` instead
1 parent 5c5e6b1 commit 3af0092

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

binderhub/launcher.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@ async def handle_chunk(chunk):
287287
self.log.debug("Requesting progress for {username}: {progress_api_url}")
288288
resp_future = self.api_request(
289289
progress_api_url,
290-
streaming_callback=handle_chunk,
290+
streaming_callback=lambda chunk: asyncio.ensure_future(
291+
handle_chunk(chunk)
292+
),
291293
request_timeout=self.launch_timeout,
292294
)
293295
try:

0 commit comments

Comments
 (0)