Skip to content

Commit 0fa98e7

Browse files
committed
patch 7.4.1289
Problem: Channel test fails on MS-Windows, connect() takes too long. Solution: Adjust the test for MS-Windows using "waittime".
1 parent ae8eb3c commit 0fa98e7

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/channel.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,8 @@ channel_open(char *hostname, int port_in, int waittime, void (*close_cb)(void))
468468
#endif
469469
}
470470

471-
if (errno == ECONNREFUSED)
471+
/* Only retry for netbeans. TODO: can we use a waittime instead? */
472+
if (errno == ECONNREFUSED && close_cb != NULL)
472473
{
473474
sock_close(sd);
474475
if ((sd = (sock_T)socket(AF_INET, SOCK_STREAM, 0)) == (sock_T)-1)

src/testdir/test_channel.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ func Test_connect_waittime()
196196
" Oops, port does exists.
197197
call ch_close(handle)
198198
else
199-
" Failed connection doesn't wait the full time.
199+
" Failed connection doesn't wait the full time on Unix.
200200
let elapsed = reltime(start)
201-
call assert_true(reltimefloat(elapsed) < 1.0)
201+
call assert_true(reltimefloat(elapsed) < (has('unix') ? 1.0 : 3.0))
202202
endif
203203
endfunc

src/version.c

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

748748
static int included_patches[] =
749749
{ /* Add new patch number below this line */
750+
/**/
751+
1289,
750752
/**/
751753
1288,
752754
/**/

0 commit comments

Comments
 (0)