pcp
[Top] [All Lists]

PATCH: - Implement time-out for connect() in http_fetcher

To: pcp@xxxxxxxxxxx
Subject: PATCH: - Implement time-out for connect() in http_fetcher
From: Ryan Doyle <rdoyle@xxxxxxxxxx>
Date: Thu, 11 Apr 2013 15:37:17 +1000 (EST)
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1528829526.125235.1365658317650.JavaMail.root@xxxxxxxxxxxxxxxxxxxxxx>
Updated patch to remove code duplication.

---

A timeout setting exists in src/libpcp_http/src/http_fetcher.c. This is a library that the Apache PMDA uses to read the server status page (the source of the apache metrics).

I noticed that this library doesn't honour the timeout value when connect()'ing to a HTTP server. The patch implements a timeout for connect() via select().

See patch provided, otherwise it is in the branch "ryan" at git://github.com/ryandoyle/pcp.git.

Cheers


----
Ryan Doyle

Attachment: timeout_for_connect-v2.patch
Description: Text Data

<Prev in Thread] Current Thread [Next in Thread>