Commit 609722b4 authored by louiz’'s avatar louiz’

Merge branch 'v1'

Conflicts:
	src/network/socket_handler.hpp
parents b9424781 6a4e17cb
......@@ -139,7 +139,7 @@ void TCPSocketHandler::connect(const std::string& address, const std::string& po
this->ai_addrlen = rp->ai_addrlen;
memcpy(&this->ai_addr, rp->ai_addr, this->ai_addrlen);
memcpy(&this->addrinfo, rp, sizeof(struct addrinfo));
this->addrinfo.ai_addr = &this->ai_addr;
this->addrinfo.ai_addr = reinterpret_cast<struct sockaddr*>(&this->ai_addr);
this->addrinfo.ai_next = nullptr;
// If the connection has not succeeded or failed in 5s, we consider
// it to have failed
......
......@@ -189,7 +189,7 @@ private:
* again.
*/
struct addrinfo addrinfo;
struct sockaddr ai_addr;
struct sockaddr_in6 ai_addr;
socklen_t ai_addrlen;
protected:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment