From c4b563f26074646e1bac08b792e5106be6ffcb0e Mon Sep 17 00:00:00 2001 From: Unbit Date: Tue, 26 Aug 2014 07:41:11 +0200 Subject: [PATCH] fixed #644 --- core/uwsgi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/uwsgi.c b/core/uwsgi.c index 7597d7fe..868bf7a2 100644 --- a/core/uwsgi.c +++ b/core/uwsgi.c @@ -1583,6 +1583,17 @@ static void vacuum(void) { next: uwsgi_sock = uwsgi_sock->next; } + if (uwsgi.stats) { + // is a unix socket ? + if (!strchr(uwsgi.stats, ":") && uwsgi.stats[0] != '@') { + if (unlink(uwsgi.stats)) { + uwsgi_error("unlink()"); + } + else { + uwsgi_log("VACUUM: unix socket %s (stats) removed.\n", uwsgi.stats); + } + } + } } } }