Mercurial > vim
comparison src/channel.c @ 7945:e72438a11172 v7.4.1268
commit https://github.com/vim/vim/commit/26dfc41335ef47fe765643148ae980be388084ec
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 6 18:18:54 2016 +0100
patch 7.4.1268
Problem: Waittime is used as seconds instead of milliseconds. (Hirohito
Higashi)
Solution: Divide by 1000.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 06 Feb 2016 18:30:04 +0100 |
parents | 2e905dfc6999 |
children | a7e58c6e4e9a |
comparison
equal
deleted
inserted
replaced
7944:f2d749f1d0ac | 7945:e72438a11172 |
---|---|
438 | 438 |
439 FD_ZERO(&rfds); | 439 FD_ZERO(&rfds); |
440 FD_ZERO(&wfds); | 440 FD_ZERO(&wfds); |
441 FD_SET(sd, &rfds); | 441 FD_SET(sd, &rfds); |
442 FD_SET(sd, &wfds); | 442 FD_SET(sd, &wfds); |
443 tv.tv_sec = waittime; | 443 tv.tv_sec = waittime / 1000; |
444 tv.tv_usec = 0; | 444 tv.tv_usec = (waittime % 1000) * 1000; |
445 ret = select((int)sd+1, &rfds, &wfds, NULL, &tv); | 445 ret = select((int)sd+1, &rfds, &wfds, NULL, &tv); |
446 if (ret < 0) | 446 if (ret < 0) |
447 { | 447 { |
448 SOCK_ERRNO; | 448 SOCK_ERRNO; |
449 CHERROR("channel_open: Connect failed with errno %d\n", errno); | 449 CHERROR("channel_open: Connect failed with errno %d\n", errno); |