FS-6303 --resolve

This commit is contained in:
William King 2014-03-04 12:30:14 -08:00
parent 84c0680153
commit 138224d816
1 changed files with 2 additions and 2 deletions

View File

@ -995,8 +995,8 @@ ESL_DECLARE(esl_status_t) esl_connect_timeout(esl_handle_t *handle, const char *
goto fail;
}
memcpy(&handle->sockaddr, result->ai_addr, sizeof(handle->sockaddr));
switch(handle->sockaddr.ss_family) {
memcpy(&handle->sockaddr, result->ai_addr, result->ai_addrlen);
switch(handle->sockaddr.ss_family) {
case AF_INET:
sockaddr_in = (struct sockaddr_in*)&(handle->sockaddr);
sockaddr_in->sin_port = htons(port);