diff --git a/src/index.ts b/src/index.ts index c323090..448244c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -173,8 +173,7 @@ export default class HyperswarmWeb extends EventEmitter { private async ensureConnection(): Promise { const logErr = (await load()).logErr; - await this._connectionMutex.waitForUnlock(); - this._connectionMutex.acquire(); + await this._connectionMutex.acquire(); if (this._activeRelay) { this._connectionMutex.release();