cloudflare / speedtest

Component to perform network speed tests against Cloudflare's edge network
https://speed.cloudflare.com
MIT License
459 stars 34 forks source link

Add "onConnectionError" notification events #22

Closed itvby closed 1 year ago

itvby commented 1 year ago

Hi! Thanks for your work.

It would be a good idea to add "onConnectionError" to events.

Sometimes the application crashes due to an error calling the this.#loadEngine.stop() method because this.#loadEngine is not initialized. There is no way to catch this error.

photo_2023-07-20_16-07-06

Thanks!

bekmuradov commented 1 year ago

I had the same issue, and I managed to solve it by making changes to the BandwidthMeasurementEngine class. If you're interested in the fix and want to see the specific changes, you can find them in this pull request: https://github.com/cloudflare/speedtest/pull/24/files

vasturiano commented 1 year ago

@itvby thanks for reaching out.

This bug has been fixed, and a new onError method has also been added to the module schema. Please upgrade to v1.3.0 to get the fix.

More details on the PR: https://github.com/cloudflare/speedtest/pull/27