From e5bbe17a3bf58c1af17f2ed5633aee116232f7cf Mon Sep 17 00:00:00 2001 From: prakashsvmx Date: Fri, 26 Aug 2022 09:57:55 +0530 Subject: [PATCH] return to avoid multiple callbacks by async --- src/main/minio.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/minio.js b/src/main/minio.js index 70c9abc9..2dd7f83f 100644 --- a/src/main/minio.js +++ b/src/main/minio.js @@ -641,10 +641,10 @@ export class Client { // Retry with region returned as part of error this.makeRequest({method, bucketName, headers}, payload, [200], err.region, false, cb) } else { - cb && cb(err) + return cb && cb(err) } } - cb && cb(err) + return cb && cb(err) } this.makeRequest({method, bucketName, headers}, payload, [200], region, false, processWithRetry) }