-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve EOFError exception when remote nvim crashes #589
Problem: When the remote Nvim instance is aborted or terminates, the pynvim client will face an exception `OSError: EOF`. It is not very clear what is wrong and why EOF is received. Solution: This happens when the remote the nvim process terminates unexpectedly (or a tcp/file socket is broken or gets disconnected). We can provide a bit more detailed information about why the asyncio session is stopping, through asyncio Protocol. An `EOFError` will be raised instead of OSError. For example, during pynvim's unit tests we may see: ``` EOFError: process_exited: pid = 40000, return_code = -6 ``` which means that the Nvim subprocess (pid = 40000) exited unexpectedly after getting SIGABRT (signal 6). Other error messages (different signals such as SIGSEGV/segfault) or connection lost (when connected through socket, etc.) are also possible.
- Loading branch information
Showing
2 changed files
with
33 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters