summaryrefslogtreecommitdiff
path: root/connect.h
diff options
context:
space:
mode:
authorLibravatar Edward Thomson <ethomson@microsoft.com>2015-09-12 17:50:26 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-09-14 12:53:48 -0700
commitef8b53e78c534d732fe58a46da8dbd922287a56b (patch)
tree9cbc10bbbca8818ac2763d139bc92627440ffe75 /connect.h
parentGit 2.6-rc1 (diff)
downloadtgif-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