Skip to content

Commit

Permalink
Cleanup TODO functionality in fcgi_stop().
Browse files Browse the repository at this point in the history
Change-Id: I98191b9811d59ff2bffa7079b0238090fe0320bc
  • Loading branch information
stepheng-axis committed Feb 28, 2024
1 parent 4d2b2f8 commit 88f2982
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/fastcgi_cert_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,13 +358,16 @@ fcgi_stop(void)
FCGX_ShutdownPending();

if (g_socket != -1) {
/* TODO: error handling? */
shutdown(g_socket, SHUT_RD);
g_unlink(g_socket_path);
if (shutdown(g_socket, SHUT_RD) != 0) {
syslog(LOG_WARNING, "Could not shutdown socket, err: %s", strerror(errno));
}
if (g_unlink(g_socket_path) != 0) {
syslog(LOG_WARNING, "Could not unlink socket, err: %s", strerror(errno));
}
}
g_thread_join(g_thread);

/* TODO: closelog() ? */
closelog();
g_socket_path = NULL;
g_socket = -1;
g_thread = NULL;
Expand Down

0 comments on commit 88f2982

Please sign in to comment.