Created
September 4, 2016 13:21
-
-
Save mattn/130f41a825ec72ccddb55b189d11558f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/channel.c b/src/channel.c | |
index bbe98be..9bc0594 100644 | |
--- a/src/channel.c | |
+++ b/src/channel.c | |
@@ -2899,10 +2899,10 @@ channel_wait(channel_T *channel, sock_T fd, int timeout) | |
{ | |
int r = PeekNamedPipe((HANDLE)fd, NULL, 0, NULL, &nread, NULL); | |
- if (r && nread > 0) | |
- return CW_READY; | |
if (r == 0) | |
return CW_ERROR; | |
+ if (nread > 0) | |
+ return CW_READY; | |
/* perhaps write some buffer lines */ | |
channel_write_any_lines(); | |
@@ -3037,10 +3037,6 @@ 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) | |
{ | |
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim | |
index 24b05be..cdf4c53 100644 | |
--- a/src/testdir/shared.vim | |
+++ b/src/testdir/shared.vim | |
@@ -121,10 +121,10 @@ func WaitFor(expr) | |
for i in range(100) | |
try | |
if eval(a:expr) | |
- if has('reltime') | |
- return float2nr(reltimefloat(reltime(start)) * 1000) | |
- endif | |
- return slept | |
+ if has('reltime') | |
+ return float2nr(reltimefloat(reltime(start)) * 1000) | |
+ endif | |
+ return slept | |
endif | |
catch | |
endtry |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment