Skip to content

Commit e28f127

Browse files
committed
Fixed *connection_lost methods in asyncio event loop
1 parent 3cbf84f commit e28f127

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

neovim/msgpack_rpc/event_loop/asyncio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def connection_made(self, transport):
4444

4545
def connection_lost(self, exc):
4646
"""Used to signal `asyncio.Protocol` of a lost connection."""
47-
self._on_error(exc.message)
47+
self._on_error(exc.message if exc else 'EOF')
4848

4949
def data_received(self, data):
5050
"""Used to signal `asyncio.Protocol` of incoming data."""
@@ -53,9 +53,9 @@ def data_received(self, data):
5353
return
5454
self._queued_data.append(data)
5555

56-
def pipe_connection_lost(self, exc):
56+
def pipe_connection_lost(self, fd, exc):
5757
"""Used to signal `asyncio.SubprocessProtocol` of a lost connection."""
58-
self._on_error(exc.message)
58+
self._on_error(exc.message if exc else 'EOF')
5959

6060
def pipe_data_received(self, fd, data):
6161
"""Used to signal `asyncio.SubprocessProtocol` of incoming data."""

0 commit comments

Comments
 (0)