From 89e5b63c32644b57df19b7de75275b41edb890d0 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 11 Apr 2020 17:46:36 -0700 Subject: [PATCH] Don't try to remove a non-existent file --- router/router_server.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/router/router_server.go b/router/router_server.go index bbc4a52..c93c8e7 100644 --- a/router/router_server.go +++ b/router/router_server.go @@ -205,12 +205,5 @@ func deleteServer(c *gin.Context) { // Deallocate the reference to this server. s = nil - // Remove the configuration file stored on the Daemon for this server. - go func(u string) { - if err := os.Remove("data/servers/" + u + ".yml"); err != nil { - zap.S().Warnw("failed to delete server configuration file while processing deletion request", zap.String("server", u), zap.Error(errors.WithStack(err))) - } - }(uuid) - c.Status(http.StatusNoContent) }