Skip to content

Commit 4cafa6d

Browse files
committed
patch 7.4.1423
Problem: Channel test fails on MS-Windows. Solution: Do not give an error message when reading fails, assume the other end exited.
1 parent 46c8543 commit 4cafa6d

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/channel.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1763,10 +1763,13 @@ channel_read(channel_T *channel, int part, char *func)
17631763
break; /* did read everything that's available */
17641764
}
17651765

1766-
/* Reading a disconnection (readlen == 0), or an error.
1767-
* TODO: call error callback. */
1766+
/* Reading a disconnection (readlen == 0), or an error. */
17681767
if (readlen <= 0)
17691768
{
1769+
/* Do not give an error message, most likely the other end just
1770+
* exited. */
1771+
ch_errors(channel, "%s(): Cannot read from channel", func);
1772+
17701773
/* Queue a "DETACH" netbeans message in the command queue in order to
17711774
* terminate the netbeans session later. Do not end the session here
17721775
* directly as we may be running in the context of a call to
@@ -1777,13 +1780,6 @@ channel_read(channel_T *channel, int part, char *func)
17771780
* -> gui event loop or select loop
17781781
* -> channel_read()
17791782
*/
1780-
ch_errors(channel, "%s(): Cannot read", func);
1781-
if (len < 0)
1782-
{
1783-
ch_error(channel, "channel_read(): cannot read from channel");
1784-
PERROR(_("E896: read from channel"));
1785-
}
1786-
17871783
msg = channel->ch_part[part].ch_mode == MODE_RAW
17881784
|| channel->ch_part[part].ch_mode == MODE_NL
17891785
? DETACH_MSG_RAW : DETACH_MSG_JSON;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ static char *(features[]) =
748748

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1423,
751753
/**/
752754
1422,
753755
/**/

0 commit comments

Comments
 (0)