diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/server/redundancy.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/controllers/api/server/redundancy.ts b/server/controllers/api/server/redundancy.ts index 99d1c762b..e36c8d2db 100644 --- a/server/controllers/api/server/redundancy.ts +++ b/server/controllers/api/server/redundancy.ts | |||
@@ -106,9 +106,11 @@ async function updateRedundancy (req: express.Request, res: express.Response) { | |||
106 | 106 | ||
107 | await server.save() | 107 | await server.save() |
108 | 108 | ||
109 | // Async, could be long | 109 | if (server.redundancyAllowed !== true) { |
110 | removeRedundanciesOfServer(server.id) | 110 | // Async, could be long |
111 | .catch(err => logger.error('Cannot remove redundancy of %s.', server.host, { err })) | 111 | removeRedundanciesOfServer(server.id) |
112 | .catch(err => logger.error('Cannot remove redundancy of %s.', server.host, { err })) | ||
113 | } | ||
112 | 114 | ||
113 | return res.status(HttpStatusCode.NO_CONTENT_204).end() | 115 | return res.status(HttpStatusCode.NO_CONTENT_204).end() |
114 | } | 116 | } |