Skip to content

Commit

Permalink
Fix bug in SseEventSourceImpl.EventHandler, which is not calling coun…
Browse files Browse the repository at this point in the history
…tDown on connectedLatch, causing useless delays
  • Loading branch information
asoldano committed Apr 21, 2017
1 parent e372882 commit c8ecb24
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,16 @@ private EventHandler(final EventHandler anotherHandler)
public void run()
{
SseEventInput eventInput = null;
final Invocation.Builder request = buildRequest();
if (state.get() == State.OPEN)
{
eventInput = request.get(SseEventInput.class);

try {
final Invocation.Builder request = buildRequest();
if (state.get() == State.OPEN)
{
eventInput = request.get(SseEventInput.class);
}
} finally {
if (connectedLatch != null) {
connectedLatch.countDown();
}
}
while (state.get() == State.OPEN)
{
Expand Down

0 comments on commit c8ecb24

Please sign in to comment.