0
0
mirror of https://github.com/vim/vim.git synced 2025-07-25 10:54:51 -04:00

patch 9.1.0639: channel timeout may wrap around

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>
This commit is contained in:
Ken Takata 2024-07-29 20:39:12 +02:00 committed by Christian Brabandt
parent 0dff31576a
commit 0bee82b1d0
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 3 additions and 1 deletions

View File

@ -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;

View File

@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
639,
/**/
638,
/**/