Skip to content

Commit

Permalink
Use a simple break instead of EOFException
Browse files Browse the repository at this point in the history
  • Loading branch information
gartens committed Mar 28, 2024
1 parent d515b45 commit d14b95d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Optional;
import java.util.Queue;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import lombok.extern.slf4j.Slf4j;
Expand Down Expand Up @@ -195,7 +196,7 @@ private void handleMessages() throws IOException, ExecutionException, Interrupte
return;
}

LinkedList<Request> waiting = new LinkedList<>();
Queue<Request> waiting = new LinkedList<>();
CompletableFuture<Request> request = waitForRequest();
CompletableFuture<Response> response = null;
Thread handle = null;
Expand Down Expand Up @@ -225,7 +226,7 @@ private void handleMessages() throws IOException, ExecutionException, Interrupte
handle = null;
Response r = response.get();
if ( r.getTypeCase() == Response.TypeCase.DISCONNECT_RESPONSE ) {
throw new EOFException();
break;
}
response = null;
}
Expand Down

0 comments on commit d14b95d

Please sign in to comment.