This repository was archived by the owner on May 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
src/main/java/com/launchdarkly/client Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 33
44All notable changes to the LaunchDarkly Java SDK will be documented in this file. This project adheres to [ Semantic Versioning] ( http://semver.org ) .
55
6+ ## [ 2.0.5] - 2016-11-09
7+ ### Changed
8+ - The StreamProcessor now listens for heartbeats from the streaming API, and will automatically reconnect if heartbeats are not received.
9+
610## [ 2.0.4] - 2016-10-12
711### Changed
812- Updated GSON dependency version to 2.7
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ repositories {
1919
2020allprojects {
2121 group = ' com.launchdarkly'
22- version = " 2.0.4 "
22+ version = " 2.0.5 "
2323 sourceCompatibility = 1.7
2424 targetCompatibility = 1.7
2525}
Original file line number Diff line number Diff line change @@ -61,11 +61,11 @@ public Future<Void> start() {
6161
6262 @ Override
6363 public void onOpen () throws Exception {
64- lastHeartbeat = DateTime .now ();
6564 }
6665
6766 @ Override
6867 public void onMessage (String name , MessageEvent event ) throws Exception {
68+ lastHeartbeat = DateTime .now ();
6969 Gson gson = new Gson ();
7070 switch (name ) {
7171 case PUT :
@@ -208,14 +208,13 @@ public void run() {
208208 try {
209209 logger .info ("Stream stopped receiving heartbeats- reconnecting." );
210210 es .close ();
211- start ();
212211 } catch (IOException e ) {
213- logger .warn ("Encountered exception closing stream connection: " + e .getMessage ());
212+ logger .error ("Encountered exception closing stream connection: " + e .getMessage ());
214213 } finally {
215214 if (es .getState () == ReadyState .SHUTDOWN ) {
216215 start ();
217216 } else {
218- logger .warn ("Expected ES to be in state SHUTDOWN, but it's currently in state " + es .getState ().toString ());
217+ logger .error ("Expected ES to be in state SHUTDOWN, but it's currently in state " + es .getState ().toString ());
219218 }
220219 }
221220 }
You can’t perform that action at this time.
0 commit comments