Skip to content

Commit b9187e0

Browse files
committed
raise IOError when a request doesn't return anything
This only happens when nvim has exited, and is caught by the Nvim.quit() method.
1 parent 4845afc commit b9187e0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

neovim/msgpack_rpc/session.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,13 @@ def request(self, method, *args):
6969
- Put requests/notifications received while waiting into a queue
7070
"""
7171
if self._is_running:
72-
err, rv = self._yielding_request(method, args)
72+
v = self._yielding_request(method, args)
7373
else:
74-
err, rv = self._blocking_request(method, args)
74+
v = self._blocking_request(method, args)
75+
if not v:
76+
# EOF
77+
raise IOError('EOF')
78+
err, rv = v
7579
if err:
7680
info("'Received error: %s", err)
7781
raise self.error_wrapper(err)

0 commit comments

Comments
 (0)