Skip to content

Commit 6e33f7d

Browse files
committed
fix: prevent request handling from processing during abortion
1 parent 17ebe6b commit 6e33f7d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ipykernel/kernelbase.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,8 @@ async def shell_main(self, subshell_id: str | None):
439439
async def _execute_request_handler(self, receive_stream):
440440
async with receive_stream:
441441
async for handler, (socket, idents, msg) in receive_stream:
442+
if self._aborting:
443+
continue
442444
try:
443445
result = handler(socket, idents, msg)
444446
self.set_parent(idents, msg, channel="shell")

0 commit comments

Comments
 (0)