aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-19 10:43:54 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-10-19 10:43:54 +0200
commitbda65bdc9f3ce7d4b6e97cb9afaca25b71added3 (patch)
tree812d3035b3aa97862a050e92301840e4f2545ae2 /server/lib
parent10db166bbe510af27cb20cc0f028537af0df9c41 (diff)
downloadPeerTube-bda65bdc9f3ce7d4b6e97cb9afaca25b71added3.tar.gz
PeerTube-bda65bdc9f3ce7d4b6e97cb9afaca25b71added3.tar.zst
PeerTube-bda65bdc9f3ce7d4b6e97cb9afaca25b71added3.zip
Fix pod removal when it is down
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/friends.ts9
1 files changed, 3 insertions, 6 deletions
diff --git a/server/lib/friends.ts b/server/lib/friends.ts
index 4cc4a82bf..65349ef5f 100644
--- a/server/lib/friends.ts
+++ b/server/lib/friends.ts
@@ -251,13 +251,10 @@ function removeFriend (pod: PodInstance) {
251 } 251 }
252 252
253 return makeSecureRequest(requestParams) 253 return makeSecureRequest(requestParams)
254 .catch(err => logger.warn('Cannot notify friends %s we are quitting him.', pod.host, err))
254 .then(() => pod.destroy()) 255 .then(() => pod.destroy())
255 .then(() => { 256 .then(() => logger.info('Removed friend %s.', pod.host))
256 logger.info('Removed friend.') 257 .catch(err => logger.error('Cannot destroy friend %s.', pod.host, err))
257 })
258 .catch(err => {
259 logger.error('Some errors while quitting friend %s (id: %d).', pod.host, pod.id, err)
260 })
261} 258}
262 259
263function getRequestScheduler () { 260function getRequestScheduler () {