diff --git a/jupyter_client/channels.py b/jupyter_client/channels.py index 61e2e4d0b..943b51208 100644 --- a/jupyter_client/channels.py +++ b/jupyter_client/channels.py @@ -216,17 +216,12 @@ async def _recv(self, **kwargs) -> t.Dict[str, t.Any]: ident, smsg = self.session.feed_identities(msg) return self.session.deserialize(smsg) - async def get_msg( - self, block: bool = True, timeout: t.Optional[float] = None - ) -> t.Dict[str, t.Any]: + async def get_msg(self, timeout: t.Optional[float] = None) -> t.Dict[str, t.Any]: """ Gets a message if there is one that is ready. """ assert self.socket is not None - if block: - if timeout is not None: - timeout *= 1000 # seconds to ms - ready = await self.socket.poll(timeout) - else: - ready = await self.socket.poll(0) + if timeout is not None: + timeout *= 1000 # seconds to ms + ready = await self.socket.poll(timeout) if ready: res = await self._recv()