We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cc15b8 commit 270fb5cCopy full SHA for 270fb5c
src/gateway.c
@@ -112,7 +112,10 @@ void get_clients_from_parent(void) {
112
debug(LOG_INFO, "Connecting to parent to download clients");
113
114
/* Connect to socket */
115
- sock = socket(AF_UNIX, SOCK_STREAM, 0);
+ if (-1 == (sock = socket(AF_UNIX, SOCK_STREAM, 0))) {
116
+ debug(LOG_ERR, "Failed to create socket (%s)", strerror(errno));
117
+ return;
118
+ }
119
memset(&sa_un, 0, sizeof(sa_un));
120
sa_un.sun_family = AF_UNIX;
121
strncpy(sa_un.sun_path, config->internal_sock, (sizeof(sa_un.sun_path) - 1));
0 commit comments