windscout 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/windscout.js +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windscout",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Find which Windscribe locations and protocols work from your network, ranked by speed (unofficial)",
5
5
  "type": "module",
6
6
  "bin": {
package/windscout.js CHANGED
@@ -150,6 +150,9 @@ async function probe(query, protocol, timeout, onStep = () => {}) {
150
150
  } finally {
151
151
  onStep("disconnecting");
152
152
  await cli("disconnect");
153
+ // the CLI's disconnect can return while the app is still tearing down (it does after a timed-out connect);
154
+ // a connect sent then is swallowed and the next attempt reads as an instant "failed", so wait it out
155
+ for (let i = 0; i < 30 && (await state()) === "Disconnecting"; i++) await sleep(1000);
153
156
  }
154
157
  }
155
158