Don't Swallow Interrupt in TransportService#onRequestReceived (#44622) (#44627)

* We shouldn't just swallow the interrupt here quietly and keep going on the IO thread
   * Currently interrupt continues here just the same way an invocation of `acceptIncomingRequests` woudl have made things continue
* Relates #44610
This commit is contained in:
Armin Braun 2019-07-19 20:35:29 +02:00 committed by GitHub
parent eafe54c81c
commit f028ab43ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -925,7 +925,8 @@ public class TransportService extends AbstractLifecycleComponent implements Tran
try {
blockIncomingRequestsLatch.await();
} catch (InterruptedException e) {
logger.trace("interrupted while waiting for incoming requests block to be removed");
Thread.currentThread().interrupt();
throw new IllegalStateException("interrupted while waiting for incoming requests block to be removed");
}
if (tracerLog.isTraceEnabled() && shouldTraceAction(action)) {
tracerLog.trace("[{}][{}] received request", requestId, action);