diff options
author | Edward Thomson <ethomson@microsoft.com> | 2015-09-12 17:50:26 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-09-14 12:53:48 -0700 |
commit | ef8b53e78c534d732fe58a46da8dbd922287a56b (patch) | |
tree | 9cbc10bbbca8818ac2763d139bc92627440ffe75 /connect.h | |
parent | Git 2.6-rc1 (diff) | |
download | tgif-ef8b53e78c534d732fe58a46da8dbd922287a56b.tar.xz |
poll: honor the timeout on Win32
Ensure that when passing a pipe, the gnulib poll replacement will not
return 0 before the timeout has passed.
Not obeying the timeout (and merely returning 0) causes pathological
behavior when preparing a packfile for a repository and taking a
long time to do so. If poll were to return 0 immediately, this would
cause keep-alives to get sent as quickly as possible until the packfile
was created. Such deviance from the standard would cause megabytes (or
more) of keep-alive packets to be sent.
GetTickCount is used as it is efficient, stable and monotonically
increasing. (Neither GetSystemTime nor QueryPerformanceCounter have
all three of these properties.)
Signed-off-by: Edward Thomson <ethomson@microsoft.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'connect.h')
0 files changed, 0 insertions, 0 deletions