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;
|
||||
}
|
||||
|
||||
rv = connect(conn_.fd, const_cast<sockaddr *>(
|
||||
&get_config()->downstream_http_proxy_addr.sa),
|
||||
rv = connect(conn_.fd, &get_config()->downstream_http_proxy_addr.sa,
|
||||
get_config()->downstream_http_proxy_addrlen);
|
||||
if (rv != 0 && errno != EINPROGRESS) {
|
||||
SSLOG(ERROR, this) << "Failed to connect to the proxy "
|
||||
|
|
|
@ -161,8 +161,7 @@ int HttpDownstreamConnection::attach_downstream(Downstream *downstream) {
|
|||
}
|
||||
|
||||
int rv;
|
||||
rv = connect(conn_.fd, const_cast<sockaddr *>(
|
||||
&get_config()->downstream_addrs[i].addr.sa),
|
||||
rv = connect(conn_.fd, &get_config()->downstream_addrs[i].addr.sa,
|
||||
get_config()->downstream_addrs[i].addrlen);
|
||||
if (rv != 0 && errno != EINPROGRESS) {
|
||||
auto error = errno;
|
||||
|
|
Loading…
Reference in New Issue