From 50633ef295ff86457f0856165d76ff540876d0b0 Mon Sep 17 00:00:00 2001 From: Grzegorz Godlewski Date: Wed, 31 Jul 2024 14:59:08 +0200 Subject: [PATCH] fix: fixed the issue blocking GolemNetwork.disconnecte because of missing gftp --- src/golem-network/golem-network.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/golem-network/golem-network.ts b/src/golem-network/golem-network.ts index 6c00f5908..31974e1e7 100644 --- a/src/golem-network/golem-network.ts +++ b/src/golem-network/golem-network.ts @@ -356,15 +356,14 @@ export class GolemNetwork { * @return Resolves when all shutdown steps are completed */ async disconnect() { - if (!this.isConnected()) { - return; - } if (this.disconnectPromise) { return this.disconnectPromise; } + this.disconnectPromise = this.startDisconnect().finally(() => { this.disconnectPromise = undefined; }); + return this.disconnectPromise; }