Skip to content

Commit ca568ae

Browse files
committed
patch 7.4.1230
Problem: Win32: opening a channel may hang. Not checking for messages while waiting for characters. Solution: Add a zero timeout. Call parse_queued_messages(). (Yasuhiro Matsumoto)
1 parent fb1f626 commit ca568ae

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/os_win32.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,10 +1461,12 @@ WaitForChar(long msec)
14611461
*/
14621462
for (;;)
14631463
{
1464+
#ifdef MESSAGE_QUEUE
1465+
parse_queued_messages();
1466+
#endif
14641467
#ifdef FEAT_MZSCHEME
14651468
mzvim_check_threads();
14661469
#endif
1467-
14681470
#ifdef FEAT_CLIENTSERVER
14691471
serverProcessPendingMessages();
14701472
#endif
@@ -1474,7 +1476,11 @@ WaitForChar(long msec)
14741476
maxfd = channel_select_setup(-1, &rfds);
14751477
if (maxfd >= 0)
14761478
{
1477-
ret = select(maxfd + 1, &rfds, NULL, NULL, NULL);
1479+
struct timeval tv;
1480+
1481+
tv.tv_sec = 0;
1482+
tv.tv_usec = 0;
1483+
ret = select(maxfd + 1, &rfds, NULL, NULL, &tv);
14781484
if (ret > 0 && channel_select_check(ret, &rfds) > 0)
14791485
return TRUE;
14801486
}

src/version.c

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

743743
static int included_patches[] =
744744
{ /* Add new patch number below this line */
745+
/**/
746+
1230,
745747
/**/
746748
1229,
747749
/**/

0 commit comments

Comments
 (0)