Skip to content

Commit

Permalink
Revert "only flush stream in dispatch_shell if possible"
Browse files Browse the repository at this point in the history
This reverts commit c3f6e61.
  • Loading branch information
Chilipp committed Jun 13, 2019
1 parent bb55e7e commit 14a2c7a
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions ipykernel/kernelbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,7 @@ def dispatch_shell(self, stream, msg):
self._publish_status(u'idle')
# flush to ensure reply is sent before
# handling the next request
try:
stream.flush(zmq.POLLOUT)
except AttributeError:
pass
stream.flush(zmq.POLLOUT)
return

msg_type = msg['header']['msg_type']
Expand Down Expand Up @@ -286,10 +283,7 @@ def dispatch_shell(self, stream, msg):
self._publish_status(u'idle')
# flush to ensure reply is sent before
# handling the next request
try:
stream.flush(zmq.POLLOUT)
except AttributeError:
pass
stream.flush(zmq.POLLOUT)

def pre_handler_hook(self):
"""Hook to execute before calling message handler"""
Expand Down

0 comments on commit 14a2c7a

Please sign in to comment.