fixed callback for CURLMOPT_TIMERFUNCTION not being called again when… #15627
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue is reproducible for me if I have made request with multi handle, then I make request that will take very long and then I make request that should be fast again, however what happens it is that it seems to think that timeout was not changed and it makes it not call initial CURLMOPT_TIMERFUNCTION
Log:
508228:20241122:172515.743 In zbx_http_request_prepare() request method 'GET' URL 'localhost:8080/hello' headers ''
508228:20241122:172515.761 End of zbx_http_request_prepare():SUCCEED
expire timestamps:0.0 -> 20372.68080 now:20372.71430 timeout_ms:0
Curl_update_timer(), had no timeout, set now
Curl_update_timer(), set timeout 0ms
508228:20241122:172515.771 start_timeout() timeout:0
508228:20241122:172515.773 In zbx_http_request_prepare() request method 'GET' URL 'localhost:8080/timeout' headers ''
508228:20241122:172515.774 End of zbx_http_request_prepare():SUCCEED
expire timestamps:20372.68080 -> 20372.68080 now:20372.80296 timeout_ms:0
Curl_update_timer(), same expire timestamp, no change
508228:20241122:172515.781 End of async_initiate_queued_checks(): num:2
508228:20241122:172515.782 In on_timeout()
508228:20241122:172515.880 In handle_socket() action:2
508228:20241122:172515.882 End of handle_socket()
508228:20241122:172515.889 In handle_socket() action:2
508228:20241122:172515.889 End of handle_socket()
expire timestamps:20372.68080 -> 20372.347305 now:20372.195431 timeout_ms:153
Curl_update_timer(), expire timestamp changed
Curl_update_timer(), set timeout 153ms
508228:20241122:172515.891 start_timeout() timeout:153
508228:20241122:172515.892 End of on_timeout()
508228:20241122:172515.893 In curl_perform()
508228:20241122:172515.959 In handle_socket() action:4
508228:20241122:172515.960 End of handle_socket()
expire timestamps:20372.347305 -> 20372.390129 now:20372.266304 timeout_ms:124
Curl_update_timer(), expire timestamp changed
Curl_update_timer(), set timeout 124ms
508228:20241122:172515.962 start_timeout() timeout:124
508228:20241122:172515.962 running_handles:1
508228:20241122:172515.963 pending cURL messages:0
508228:20241122:172515.964 In process_httpagent_result()
508228:20241122:172515.972 name 'Content-Type' value 'text/plain; charset=utf-8' amount:1 index:0 origin:134217729
508228:20241122:172515.985 finished processing itemid:48298
508228:20241122:172515.995 End of process_httpagent_result()
508228:20241122:172515.995 End of curl_perform()
508228:20241122:172515.995 In curl_perform()
508228:20241122:172515.999 In handle_socket() action:1
508228:20241122:172515.999 End of handle_socket()
expire timestamps:20372.390129 -> 20372.390129 now:20372.304592 timeout_ms:86
Curl_update_timer(), same expire timestamp, no change
508228:20241122:172516.000 running_handles:1
508228:20241122:172516.000 End of curl_perform()
508228:20241122:172516.001 In zbx_ipc_socket_open()
508228:20241122:172516.001 End of zbx_ipc_socket_open():SUCCEED
508228:20241122:172516.002 In zbx_ipc_socket_write()
508228:20241122:172516.003 End of zbx_ipc_socket_write():SUCCEED
508228:20241122:172516.004 requeue num:1
508228:20241122:172516.016 requeue items nextcheck:1732289158
508228:20241122:172516.019 In on_timeout()
expire timestamps:20372.390129 -> 20372.390129 now:20372.324148 timeout_ms:66
Curl_update_timer(), same expire timestamp, no change
508228:20241122:172516.020 End of on_timeout()
508228:20241122:172516.679 In zbx_dc_config_get_poller_items() poller_type:7
508228:20241122:172535.692 End of zbx_prepare_items()
508228:20241122:172535.692 queue processing_num:1 pending:0
508228:20241122:172535.693 In async_initiate_queued_checks()
508228:20241122:172535.693 In zbx_http_request_prepare() request method 'GET' URL 'localhost:8080/hello' headers ''
508228:20241122:172535.693 End of zbx_http_request_prepare():SUCCEED
expire timestamps:20372.390129 -> 20372.390129 now:20391.998933 timeout_ms:0
Curl_update_timer(), same expire timestamp, no change