]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1849 v7.4.1849
authorBram Moolenaar <Bram@vim.org>
Fri, 27 May 2016 17:59:48 +0000 (19:59 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 27 May 2016 17:59:48 +0000 (19:59 +0200)
Problem:    Still trying to read from channel that is going to be closed.
            (Ramel Eshed)
Solution:   Check if ch_to_be_closed is set.

src/channel.c
src/version.c

index a5a84dc9c4b63c39b26d51534d88793065465f74..84dfcf7c0b7a17a21700cfb51a463460e18b03b5 100644 (file)
@@ -2893,6 +2893,10 @@ channel_read(channel_T *channel, int part, char *func)
     sock_T             fd;
     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;
     if (fd == INVALID_FD)
     {
@@ -3193,6 +3197,10 @@ channel_handle_events(void)
 
     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 */
        for (part = PART_SOCK; part <= PART_ERR; ++part)
        {
index 4922a0e2261834e73bde627fd63db4f42c9f38c6..2a259a528eb74e364d590712e70e376322bf60f2 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1849,
 /**/
     1848,
 /**/