Skip to content

Commit

Permalink
fix: server does not start because it assumed it is already running
Browse files Browse the repository at this point in the history
  • Loading branch information
pokab committed Aug 22, 2015
1 parent 0bcf16f commit 1bd2984
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ static int server_ping(struct sockaddr_un *un)
if (fd < 0)
return 0;

sigaction(SIGALRM, &sa, &oldsa);
sigaction(SIGALRM, &sa, &oldsa);
if (sigsetjmp(ping_timeout_ctx, 1) == 0) {
ret = 0;
ret = -1;
alarm(initial_ping_timeout);
if (connect(fd, un, sizeof(struct sockaddr_un)) < 0)
goto cleanup;
Expand All @@ -315,7 +315,7 @@ static int server_ping(struct sockaddr_un *un)
sigaction(SIGALRM, &oldsa, NULL);
alarm(0);
close(fd);
return ret;
return ret;
}

void server_setup(void)
Expand Down

0 comments on commit 1bd2984

Please sign in to comment.