Skip to content

Commit cdfe144

Browse files
committed
Merge branch 'main' into zmq_anyio
2 parents 070a77a + dcdc56e commit cdfe144

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ipykernel/iostream.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,9 @@ def _watch_pipe_fd(self):
386386
387387
"""
388388

389+
if self._fid is None:
390+
return
391+
389392
try:
390393
bts = os.read(self._fid, PIPE_BUFFER_SIZE)
391394
while bts and self._should_watch:
@@ -439,6 +442,7 @@ def __init__(
439442
self.session = session
440443
self._has_thread = False
441444
self.watch_fd_thread = None
445+
self._fid = None
442446
if not isinstance(pub_thread, IOPubThread):
443447
# Backward-compat: given socket, not thread. Wrap in a thread.
444448
warnings.warn(

0 commit comments

Comments
 (0)