Imgkl / EventFlux

A Dart package for efficient handling of server-sent event streams with easy connectivity and data management.
https://pub.dev/packages/eventflux
MIT License
25 stars 8 forks source link

onSuccessCallback should not be called unless 200 is returned #15

Closed jangruenwaldt closed 5 months ago

jangruenwaldt commented 6 months ago

You can test this by adding an invalid target URL.

In the current version, onSuccessCallback will be called, but immediately afterward the error handler is called.

Ideally, onSuccessCallback is only called if the connection is actually established. This would help me to reset e.g. the expontential back off attempt counter after the connection is established.

jangruenwaldt commented 6 months ago

https://github.com/Imgkl/EventFlux/pull/16 made a PR for this

Imgkl commented 5 months ago

Hey @jangruenwaldt,

Thanks for the contribution, it is merged to main and a new version of the EventFlux is out now.

jangruenwaldt commented 5 months ago

@Imgkl Fantastic, thx so much for the new release 🎉