Ozaki kiichi wrote: > I could reproduce this error after many trials. > But I encountered similar kind of failures a few time in also > v7.5.1456 test_channel. > > In my case, "write failed" is caused by "Broken pipe". (confirmed by > adding log message) This means that process had exited from while > loop* (not by 'return NULL') even though connection had not been > established. > > * https://github.com/vim/vim/blob/d42119f/src/channel.c#L594-L756 > > We may require the following: > > diff --git a/src/channel.c b/src/channel.c > --- a/src/channel.c > +++ b/src/channel.c > @@ -703,7 +703,7 @@ channel_open( > * actually connect. > * We detect an failure to connect when both read and write fds > * are set. Use getsockopt() to find out what kind of failure. */ > - if (FD_ISSET(sd, &rfds) && FD_ISSET(sd, &wfds)) > + if (FD_ISSET(sd, &rfds) || FD_ISSET(sd, &wfds)) > { > ret = getsockopt(sd, > SOL_SOCKET, SO_ERROR, &so_error, &so_error_len); > > That is, increased the frequency of checking socket error.
It's unclear to me what the table in the socket(7) man page means. It mentions using select() but then the situation that the connection can't be made is not in the table. Looks like changing the && into || can't make it worse, so let's see if that helps. -- If you don't get everything you want, think of everything you didn't get and don't want. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
