Skip to content

Commit c49c317

Browse files
committed
fix(apache): fix using unix socket for apache2
1 parent f3a57c7 commit c49c317

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/mod_redirectionio.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,14 @@ static apr_status_t redirectionio_create_connection(redirectionio_connection *co
461461
return rv;
462462
}
463463

464-
rv = apr_socket_opt_set(conn->rio_sock, APR_TCP_NODELAY, 1);
464+
if (config->server.protocol == TCP) {
465+
rv = apr_socket_opt_set(conn->rio_sock, APR_TCP_NODELAY, 1);
465466

466-
if (rv != APR_SUCCESS) {
467-
ap_log_perror(APLOG_MARK, APLOG_ERR, 0, pool, "mod_redirectionio: Error setting socket TCP nodelay: %s", apr_strerror(rv, errbuf, sizeof(errbuf)));
467+
if (rv != APR_SUCCESS) {
468+
ap_log_perror(APLOG_MARK, APLOG_ERR, 0, pool, "mod_redirectionio: Error setting socket TCP nodelay: %s", apr_strerror(rv, errbuf, sizeof(errbuf)));
468469

469-
return rv;
470+
return rv;
471+
}
470472
}
471473

472474
rv = apr_socket_timeout_set(conn->rio_sock, config->server.timeout * 1000);

0 commit comments

Comments
 (0)