0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 7.4.1849

Problem:    Still trying to read from channel that is going to be closed.
            (Ramel Eshed)
Solution:   Check if ch_to_be_closed is set.
This commit is contained in:
Bram Moolenaar
2016-05-27 19:59:48 +02:00
parent 6727bf8617
commit 5850a764ea
2 changed files with 10 additions and 0 deletions

View File

@@ -2893,6 +2893,10 @@ channel_read(channel_T *channel, int part, char *func)
sock_T fd; sock_T fd;
int use_socket = FALSE; int use_socket = FALSE;
/* If we detected a read error don't try reading again. */
if (channel->ch_to_be_closed)
return;
fd = channel->ch_part[part].ch_fd; fd = channel->ch_part[part].ch_fd;
if (fd == INVALID_FD) if (fd == INVALID_FD)
{ {
@@ -3193,6 +3197,10 @@ channel_handle_events(void)
for (channel = first_channel; channel != NULL; channel = channel->ch_next) for (channel = first_channel; channel != NULL; channel = channel->ch_next)
{ {
/* If we detected a read error don't try reading again. */
if (channel->ch_to_be_closed)
continue;
/* check the socket and pipes */ /* check the socket and pipes */
for (part = PART_SOCK; part <= PART_ERR; ++part) for (part = PART_SOCK; part <= PART_ERR; ++part)
{ {

View File

@@ -753,6 +753,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1849,
/**/ /**/
1848, 1848,
/**/ /**/