Releases: launchdarkly/eventsource
Releases · launchdarkly/eventsource
1.4.0
[1.4.0] - 2020-03-25
Added:
- New option
StreamOptionErrorHandler
provides an alternate way to receive errors and control howStream
behaves after an error. - New
Stream
methodRestart()
provides a way to make the stream reconnect at any time even if it has not detected an error, using the same retry semantics (backoff, jitter, etc.) that have already been configured.
1.3.0
[1.3.0] - 2020-03-24
Added:
- New option
StreamOptionUseBackoff
allowsStream
to be configured to use exponential backoff for reconnections. There was existing logic for exponential backoff, but it was not working, so until now the retry delay was always the same; for backward compatibility with that behavior, the default is still to not use backoff. - The new option
StreamOptionRetryResetInterval
can be used in conjunction withStreamOptionUseBackoff
to determine when, if ever, the retry delay can be reset to its initial value rather than continuing to decrease. - New option
StreamOptionUseJitter
tellsStream
to subtract a pseudo-random amount from the retry delay. - New option
StreamOptionCanRetryFirstConnection
tellsStream
that it can retry the initial connection attempt. Previously, a failed initial connection would be considered a permanent failure.
1.2.0
[1.2.0] - 2019-06-17
Added:
NewDecoderWithOptions
allows creating aDecoder
with non-default settings; currently the only such setting isDecoderOptionReadTimeout
. Normally you will not need to create aDecoder
directly; it is done automatically byStream
.
Fixed:
- Reverted an unintentional change in v1.1.0 to the signature of the exported function
NewDecoder
.
1.1.0
[1.1.0] - 2018-10-03
Added:
- It is now possible to specify a read timeout for a stream. If the stream does not receive new data (either events or comments) within this interval, it will emit an error and restart the connection.
- New stream constructor methods
SubscribeWithURL
andSubscribeWithRequestAndOptions
allow any combination of optional configuration parameters to be specified for a stream: read timeout, initial retry delay, last event ID, HTTP client, logger.
[1.0.1] - 2018-07-20
[1.0.1] - 2018-07-20
Fixed:
- Avoid trying to to decode non-200 responses which was generating extra error messages
[1.0.0] - 2018-06-14- Add Close
[1.0.0] - 2018-06-14
Added:
- Added support for Close() Method