mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-04-10 02:21:58 +02:00
parent
ae19460c13
commit
e57342e7ac
|
|
@ -527,7 +527,7 @@ static int net__try_connect_tcp(const char *host, uint16_t port, mosq_sock_t *so
|
|||
static int net__try_connect_unix(const char *host, mosq_sock_t *sock)
|
||||
{
|
||||
struct sockaddr_un addr;
|
||||
int s;
|
||||
mosq_sock_t s;
|
||||
int rc;
|
||||
|
||||
if(host == NULL || strlen(host) == 0 || strlen(host) > sizeof(addr.sun_path)-1){
|
||||
|
|
@ -551,7 +551,7 @@ static int net__try_connect_unix(const char *host, mosq_sock_t *sock)
|
|||
|
||||
rc = connect(s, (struct sockaddr *)&addr, sizeof(struct sockaddr_un));
|
||||
if(rc < 0){
|
||||
close(s);
|
||||
COMPAT_CLOSE(s);
|
||||
return MOSQ_ERR_ERRNO;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue