File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -394,12 +394,10 @@ async def execute(
394394 # Stream the results.
395395 # If the client disconnects (Starlette cancels the task), we
396396 # interrupt the kernel so the next execution isn't blocked (#213).
397- client_disconnected = False
398397 try :
399398 async for item in self ._wait_for_result (message_id ):
400399 yield item
401400 except (asyncio .CancelledError , GeneratorExit ):
402- client_disconnected = True
403401 logger .warning (
404402 f"Client disconnected during execution ({ message_id } ), interrupting kernel"
405403 )
@@ -415,7 +413,7 @@ async def execute(
415413 del self ._executions [message_id ]
416414
417415 # Clean up env vars in a separate request after the main code has run
418- if env_vars and not client_disconnected :
416+ if env_vars :
419417 self ._cleanup_task = asyncio .create_task (
420418 self ._cleanup_env_vars (env_vars )
421419 )
You can’t perform that action at this time.
0 commit comments