summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Takata <kentkt@csc.jp>2024-07-29 20:39:12 +0200
committerChristian Brabandt <cb@256bit.org>2024-07-29 20:39:12 +0200
commit0bee82b1d0a46a6ca6fb4ffcebd6a63d4141a355 (patch)
treea9021ddc07d13dd153459bf02260901fb67f746e
parent0dff31576a340b74cec81517912923c38cb28450 (diff)
patch 9.1.0639: channel timeout may wrap aroundv9.1.0639
Problem: channel timeout may wrap around Solution: Correct timeout calculation when GetTickCount() wraps around (Ken Takata) closes: #15390 Signed-off-by: Ken Takata <kentkt@csc.jp> Signed-off-by: Christian Brabandt <cb@256bit.org>
-rw-r--r--src/channel.c2
-rw-r--r--src/version.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/channel.c b/src/channel.c
index b99b3a90ae..69bbff24e9 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -2277,7 +2277,7 @@ channel_parse_json(channel_T *channel, ch_part_T part)
{
int timeout;
#ifdef MSWIN
- timeout = GetTickCount() > chanpart->ch_deadline;
+ timeout = (int)(GetTickCount() - chanpart->ch_deadline) > 0;
#else
{
struct timeval now_tv;
diff --git a/src/version.c b/src/version.c
index f8d1762b84..97414a08a3 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 639,
+/**/
638,
/**/
637,