diff --git a/src/command_network.cc b/src/command_network.cc index ff586f66..a30087a7 100644 --- a/src/command_network.cc +++ b/src/command_network.cc @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -214,6 +215,7 @@ apply_scgi(const std::string& arg, int type) { int port, err; char dummy; char address[1024]; + std::string path; switch (type) { case 1: @@ -245,7 +247,10 @@ apply_scgi(const std::string& arg, int type) { case 2: default: - scgi->open_named(rak::path_expand(arg)); + path = rak::path_expand(arg); + + unlink(path.c_str()); + scgi->open_named(path); break; }