agent: implement connection loop with retry

This commit is contained in:
2019-01-21 23:26:39 +02:00
parent 598fd7aa74
commit 986af66adb
2 changed files with 186 additions and 155 deletions

View File

@@ -49,7 +49,6 @@ int connect_to_rmps(const char *hostname, int port)
addr.sin_addr.s_addr = *(long*)(host->h_addr);
if (connect(sd, (struct sockaddr*)&addr, sizeof(addr)) == FAIL) {
close(sd);
perror(hostname);
return 0;
}
return sd;