Skip to content

Commit be4fe79

Browse files
committed
Cleanup proxy timeouts a bit to remove emits and make consistent to vhost timeout. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95674 13f79535-47bb-0310-9956-ffa450edef68
1 parent 6f440e2 commit be4fe79

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

modules/proxy/mod_proxy.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ typedef struct {
194194
int error_override_set;
195195
int preserve_host;
196196
int preserve_host_set;
197-
int timeout;
198-
int timeout_set;
197+
apr_interval_time_t timeout;
198+
apr_interval_time_t timeout_set;
199199

200200
} proxy_server_conf;
201201

modules/proxy/proxy_ftp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -968,11 +968,11 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf,
968968

969969
/* Set a timeout on the socket */
970970
if (conf->timeout_set == 1) {
971-
apr_setsocketopt(sock, APR_SO_TIMEOUT, conf->timeout);
971+
apr_setsocketopt(sock, APR_SO_TIMEOUT, (int)conf->timeout);
972972
}
973973
else {
974974
apr_setsocketopt(sock,
975-
APR_SO_TIMEOUT, r->server->timeout);
975+
APR_SO_TIMEOUT, (int)r->server->timeout);
976976
}
977977

978978
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,

modules/proxy/proxy_http.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ apr_status_t ap_proxy_http_create_connection(apr_pool_t *p, request_rec *r,
319319
apr_size_t buffer_len = 1;
320320
char test_buffer[1];
321321
apr_status_t socket_status;
322-
apr_int32_t current_timeout;
322+
apr_short_interval_time_t current_timeout;
323323

324324
/* use previous keepalive socket */
325325
*origin = backend->connection;

modules/proxy/proxy_util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,10 +1158,10 @@ PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **newsock,
11581158

11591159
/* Set a timeout on the socket */
11601160
if (conf->timeout_set == 1) {
1161-
apr_setsocketopt(*newsock, APR_SO_TIMEOUT, conf->timeout);
1161+
apr_setsocketopt(*newsock, APR_SO_TIMEOUT, (int)conf->timeout);
11621162
}
11631163
else {
1164-
apr_setsocketopt(*newsock, APR_SO_TIMEOUT, s->timeout);
1164+
apr_setsocketopt(*newsock, APR_SO_TIMEOUT, (int)s->timeout);
11651165
}
11661166

11671167
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,

0 commit comments

Comments
 (0)