dart-eventsource icon indicating copy to clipboard operation
dart-eventsource copied to clipboard

Add Eventsource.close() method

Open Skycoder42 opened this issue 3 years ago • 1 comments

This PR simply adds the ability to close an event source. It does this by canceling any active connections to the server and then closes the internal controller to ensure all listeners receive the done event.

I also made sure that a cancellation while the event source is trying to reconnect leads to the reconnection being stopped.

Skycoder42 avatar Mar 26 '22 13:03 Skycoder42

This would also close #15 I think

Skycoder42 avatar Mar 26 '22 13:03 Skycoder42