minfrin commented on a change in pull request #8: URL: https://github.com/apache/tomcat-native/pull/8#discussion_r532261117
########## File path: native/src/network.c ########## @@ -79,6 +80,17 @@ static apr_status_t sp_socket_cleanup(void *data) (*s->net->cleanup)(s->opaque); if (s->sock) { apr_socket_t *as = s->sock; +#ifdef APR_UNIX + apr_sockaddr_t *sa = NULL; + apr_socket_addr_get(&sa, APR_LOCAL, as); + if (sa && sa->family == APR_UNIX) { + char *sock; + apr_getnameinfo(&sock, sa, 0); + if (sock) { + apr_file_remove(sock, s->pool); Review comment: In theory the order shouldn't matter, the socket becomes invisible once deleted. I've redone the cleanup as there is no way to distinguish between cleaning up the main listening socket and the individual connections. Now the cleanup only runs when the pool created by create is destroyed. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org