From b97f32487849421ab07b410640b1b5e32b7beb03 Mon Sep 17 00:00:00 2001 From: LaunchDarklyReleaseBot Date: Tue, 10 Jan 2023 01:17:23 +0000 Subject: [PATCH] Releasing version 4.0.1 --- CHANGELOG.md | 7 +++++++ gradle.properties | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a77f6f..3565715 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to the LaunchDarkly EventSource implementation for Java will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org). +## [4.0.1] - 2023-01-09 +### Added: +- `StreamClosedWithIncompleteMessageException` (see below). + +### Fixed: +- When using streaming data mode (see `EventSource.Builder.streamEventData`), if the stream connection was lost before the `MessageEvent` was fully read-- that is, before encountering a blank line-- the `Reader` returned by `MessageEvent.getDataReader()` was treating this as a regular EOF condition. That was incorrect; the SSE specification says that in such a case, the incomplete message is invalid and its contents should not be used. Therefore, in this case reading from the `Reader` will throw a `StreamClosedWithIncompleteMessageException`. The caller should handle this by simply throwing away the `MessageEvent`. + ## [4.0.0] - 2022-12-19 This release revises the implementation of `EventSource` so that it does not create its own worker threads. The methods for starting and reading a stream now perform synchronous I/O, and the caller is responsible for choosing what thread to start the stream and read the stream on. This makes the core implementation simpler and more efficient, and reduces possibilities for deadlock. If you want to continue using the old asynchronous push model, see the `com.launchdarkly.eventsource.background` package. diff --git a/gradle.properties b/gradle.properties index 0c93e04..6416b71 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=4.0.0 +version=4.0.1 ossrhUsername= ossrhPassword=