mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-03-24 01:04:29 +08:00
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user