curl_easy_perform: fix timeout handling 76/210676/2
authorDaniel Stenberg <daniel@haxx.se>
Sat, 24 Nov 2018 22:20:19 +0000 (23:20 +0100)
committerNiraj Kumar Goit <niraj.g@samsung.com>
Tue, 23 Jul 2019 14:29:18 +0000 (19:59 +0530)
commit22ce8113ef79753e458d7b177317068600ec15c4
tree67a959f4acd4252dd7f504f3a96760a620a04e29
parent01fd1f857cb7b82536f890066f17ec2d7b9f406e
curl_easy_perform: fix timeout handling

curl_multi_wait() was erroneously used from within
curl_easy_perform(). It could lead to it believing there was no socket
to wait for and then instead sleep for a while instead of monitoring the
socket and then miss acting on that activity as swiftly as it should
(causing an up to 1000 ms delay).

Reported-by: Antoni Villalonga
Fixes #3305
Clodes #3306

Backported patch details:
https://github.com/curl/curl/commit/d04cef9ce1d710902d90b62de01115b9bbe958bf.patch

Change-Id: I08d95e996dd9bab5d9fd7c7fe581fdb40c8a0de8
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
lib/easy.c
lib/multi.c
lib/multiif.h