Fix push outputs to use the correct remote addresses

This commit is contained in:
Thulinma 2022-10-10 14:16:48 +02:00
parent 7098f8430b
commit 0674443066
7 changed files with 9 additions and 5 deletions

View file

@ -1207,7 +1207,7 @@ std::string Socket::Connection::getBinHost(){
}
/// Sets hostname for connection manually.
/// Overwrites the detected host, thus possibily making it incorrect.
/// Overwrites the detected host, thus possibly making it incorrect.
void Socket::Connection::setHost(std::string host){
remotehost = host;
struct addrinfo *result, hints;

View file

@ -208,6 +208,7 @@ namespace Socket{
if (outgoing_port){setupAdapter("", outgoing_port);}
sockaddr_in sa = createInetAddr(_host, _port);
memcpy(&remoteaddr, &sa, sizeof(sockaddr_in));
sockaddr *psa = (sockaddr *)&sa;
HIGH_MSG("Going to connect sock %d", sock);