This repository was archived by the owner on May 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/main/java/com/launchdarkly/client Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -75,12 +75,12 @@ private static enum State {
7575 * a static {@link EventSource#target(javax.ws.rs.client.WebTarget) EventSource.target(endpoint)} factory method.
7676 * <p>
7777 * For example:
78+ * </p>
7879 * <pre>
7980 * EventSource es = EventSource.target(endpoint).named("my source")
8081 * .reconnectingEvery(5, SECONDS)
8182 * .open();
8283 * </pre>
83- * </p>
8484 *
8585 * @since 2.3
8686 */
@@ -497,12 +497,15 @@ public void run() {
497497 EventInput eventInput = null ;
498498 try {
499499 try {
500+ logger .debug ("current state is {0}" , state .get ());
500501 final Invocation .Builder request = prepareHandshakeRequest ();
501502 if (state .get () == State .OPEN ) { // attempt to connect only if even source is open
502503 logger .debug ("Connecting..." );
503504 eventInput = request .get (EventInput .class );
504505 logger .debug ("Connected!" );
505506 }
507+ } catch (Exception e ) {
508+ logger .warn ("Encountered error trying to connect" , e );
506509 } finally {
507510 if (firstContactSignal != null ) {
508511 // release the signal regardless of event source state or connection request outcome
You can’t perform that action at this time.
0 commit comments