diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-26 10:00:12 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-26 10:01:42 +0200 |
commit | 7b6cf83e33c1cf9719f77338288b9145b8cdcf60 (patch) | |
tree | 6c3b213aca2cc298f4dbd70d1fb87bbe37154e15 /server/controllers | |
parent | 5a298a5a3d000f94c944d3711d4b0226a888df04 (diff) | |
download | PeerTube-7b6cf83e33c1cf9719f77338288b9145b8cdcf60.tar.gz PeerTube-7b6cf83e33c1cf9719f77338288b9145b8cdcf60.tar.zst PeerTube-7b6cf83e33c1cf9719f77338288b9145b8cdcf60.zip |
Fix redundancy remove on host redundancy update
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 | } |