Skip to content

Commit

Permalink
[621] Code review changes
Browse files Browse the repository at this point in the history
Signed-off-by: Andy McCright <[email protected]>
  • Loading branch information
andymc12 committed Jan 15, 2020
1 parent 14ba559 commit bd6161a
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class SseEventSourceImpl implements SseEventSource {
private volatile long delay;
// Indicates the this SseEventSource has been opened. It will remain true even if this is moved back to the
// connecting state due to a scheduled reconnect.
private volatile boolean isOpened;
private volatile boolean opened;

private class InboundSseEventListenerDelegate implements InboundSseEventListener {
private String lastEventId;
Expand Down Expand Up @@ -191,7 +191,7 @@ public void open() {
// If a 503 was receieved during connect we might be in the "Connecting" state, however
// the isOpened flag will need to be set indicating that the eventsource has been opened
// and not yet closed.
isOpened = true;
opened = true;
}

private void connect(String lastEventId) {
Expand Down Expand Up @@ -265,7 +265,6 @@ private void connect(String lastEventId) {
}

delegate.onError(t);
delegate.onComplete();
response.close();
return;
}
Expand Down Expand Up @@ -369,12 +368,12 @@ private long handleRetry(String retryValue) {

@Override
public boolean isOpen() {
return isOpened;
return opened;
}

@Override
public boolean close(long timeout, TimeUnit tunit) {
isOpened = false;
opened = false;
if (state.get() == SseSourceState.CLOSED) {
return true;
}
Expand Down

0 comments on commit bd6161a

Please sign in to comment.