|
|
@ -291,15 +291,15 @@ retry: |
|
|
|
if (sockd < 0) { |
|
|
|
if (sockd < 0) { |
|
|
|
if (interrupted()) |
|
|
|
if (interrupted()) |
|
|
|
goto retry; |
|
|
|
goto retry; |
|
|
|
LOGERR("Failed to accept on connector socket"); |
|
|
|
LOGERR("Failed to accept on connector socket, retrying in 5s"); |
|
|
|
ret = 1; |
|
|
|
sleep(5); |
|
|
|
goto out; |
|
|
|
goto retry; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
buf = recv_unix_msg(sockd); |
|
|
|
buf = recv_unix_msg(sockd); |
|
|
|
|
|
|
|
close(sockd); |
|
|
|
if (!buf) { |
|
|
|
if (!buf) { |
|
|
|
LOGWARNING("Failed to get message in connector_loop"); |
|
|
|
LOGWARNING("Failed to get message in connector_loop"); |
|
|
|
close(sockd); |
|
|
|
|
|
|
|
goto retry; |
|
|
|
goto retry; |
|
|
|
} |
|
|
|
} |
|
|
|
LOGDEBUG("Connector received message: %s", buf); |
|
|
|
LOGDEBUG("Connector received message: %s", buf); |
|
|
@ -319,7 +319,6 @@ retry: |
|
|
|
realloc_strcat(&buf, "\n"); |
|
|
|
realloc_strcat(&buf, "\n"); |
|
|
|
send_client(ckp, ci, client_id, buf); |
|
|
|
send_client(ckp, ci, client_id, buf); |
|
|
|
json_decref(json_msg); |
|
|
|
json_decref(json_msg); |
|
|
|
close(sockd); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
goto retry; |
|
|
|
goto retry; |
|
|
|
out: |
|
|
|
out: |
|
|
|