nghttpx: Don't need to const_cast to sockaddr*
This commit is contained in:
parent
7f9de007d0
commit
49781da8f0
|
@ -226,8 +226,7 @@ int Http2Session::initiate_connection() {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
rv = connect(conn_.fd, const_cast<sockaddr *>(
|
rv = connect(conn_.fd, &get_config()->downstream_http_proxy_addr.sa,
|
||||||
&get_config()->downstream_http_proxy_addr.sa),
|
|
||||||
get_config()->downstream_http_proxy_addrlen);
|
get_config()->downstream_http_proxy_addrlen);
|
||||||
if (rv != 0 && errno != EINPROGRESS) {
|
if (rv != 0 && errno != EINPROGRESS) {
|
||||||
SSLOG(ERROR, this) << "Failed to connect to the proxy "
|
SSLOG(ERROR, this) << "Failed to connect to the proxy "
|
||||||
|
|
|
@ -161,8 +161,7 @@ int HttpDownstreamConnection::attach_downstream(Downstream *downstream) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int rv;
|
int rv;
|
||||||
rv = connect(conn_.fd, const_cast<sockaddr *>(
|
rv = connect(conn_.fd, &get_config()->downstream_addrs[i].addr.sa,
|
||||||
&get_config()->downstream_addrs[i].addr.sa),
|
|
||||||
get_config()->downstream_addrs[i].addrlen);
|
get_config()->downstream_addrs[i].addrlen);
|
||||||
if (rv != 0 && errno != EINPROGRESS) {
|
if (rv != 0 && errno != EINPROGRESS) {
|
||||||
auto error = errno;
|
auto error = errno;
|
||||||
|
|
Loading…
Reference in New Issue