subsys/mgmt/hawkbit: Set `ai_socktype` if IPV4/IPV6
Follows the implementation of updatehub and set the
`ai_socktype` only if IPV4/IPV6
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
(cherry picked from commit dd9d6bbb44
)
This commit is contained in:
parent
0306e75a5f
commit
8abef50e97
|
@ -243,12 +243,12 @@ static bool start_http_client(void)
|
|||
|
||||
if (IS_ENABLED(CONFIG_NET_IPV6)) {
|
||||
hints.ai_family = AF_INET6;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
} else if (IS_ENABLED(CONFIG_NET_IPV4)) {
|
||||
hints.ai_family = AF_INET;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
}
|
||||
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
|
||||
while (resolve_attempts--) {
|
||||
ret = getaddrinfo(CONFIG_HAWKBIT_SERVER, CONFIG_HAWKBIT_PORT,
|
||||
&hints, &addr);
|
||||
|
|
Loading…
Reference in New Issue