From 0fa98e7b85b52c63611b2fe8e370f0aa1c8f6dc9 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 7 Feb 2016 22:21:19 +0100 Subject: [PATCH] patch 7.4.1289 Problem: Channel test fails on MS-Windows, connect() takes too long. Solution: Adjust the test for MS-Windows using "waittime". --- src/channel.c | 3 ++- src/testdir/test_channel.vim | 4 ++-- src/version.c | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/channel.c b/src/channel.c index fef6de504..5e4d1825c 100644 --- a/src/channel.c +++ b/src/channel.c @@ -468,7 +468,8 @@ channel_open(char *hostname, int port_in, int waittime, void (*close_cb)(void)) #endif } - if (errno == ECONNREFUSED) + /* Only retry for netbeans. TODO: can we use a waittime instead? */ + if (errno == ECONNREFUSED && close_cb != NULL) { sock_close(sd); if ((sd = (sock_T)socket(AF_INET, SOCK_STREAM, 0)) == (sock_T)-1) diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim index e5903ae42..7d82094f2 100644 --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -196,8 +196,8 @@ func Test_connect_waittime() " Oops, port does exists. call ch_close(handle) else - " Failed connection doesn't wait the full time. + " Failed connection doesn't wait the full time on Unix. let elapsed = reltime(start) - call assert_true(reltimefloat(elapsed) < 1.0) + call assert_true(reltimefloat(elapsed) < (has('unix') ? 1.0 : 3.0)) endif endfunc diff --git a/src/version.c b/src/version.c index 220b2c5cb..b9ca10768 100644 --- a/src/version.c +++ b/src/version.c @@ -747,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1289, /**/ 1288, /**/ -- 2.50.1