From 23b3c5d3a07d859d07dd85c0567db07dd2459e12 Mon Sep 17 00:00:00 2001 From: ThomasSelvig Date: Thu, 22 Jun 2023 17:29:07 +0200 Subject: [PATCH] fix: request proxy after registering event listener --- src/client/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/index.js b/src/client/index.js index 6d8005d..609e3ed 100644 --- a/src/client/index.js +++ b/src/client/index.js @@ -98,9 +98,9 @@ export default class Client { this.debug(`Proxy offered by ${clientId}`); this.removeHandlers(); this.debug('Requesting proxy link'); - this.pubsub.sendMessage(PROXY_LINK, clientId); this.pubsub.onceMessage(PROXY_LINK_DROP, this.onProxyLinkDrop); this.pubsub.onceMessage(PROXY_DELIVER, this.onProxyLink); + this.pubsub.sendMessage(PROXY_LINK, clientId); } onProxyLink(data) {