From bda65bdc9f3ce7d4b6e97cb9afaca25b71added3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 19 Oct 2017 10:43:54 +0200 Subject: Fix pod removal when it is down --- server/lib/friends.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'server/lib') 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) { } return makeSecureRequest(requestParams) + .catch(err => logger.warn('Cannot notify friends %s we are quitting him.', pod.host, err)) .then(() => pod.destroy()) - .then(() => { - logger.info('Removed friend.') - }) - .catch(err => { - logger.error('Some errors while quitting friend %s (id: %d).', pod.host, pod.id, err) - }) + .then(() => logger.info('Removed friend %s.', pod.host)) + .catch(err => logger.error('Cannot destroy friend %s.', pod.host, err)) } function getRequestScheduler () { -- cgit v1.2.3