-
Notifications
You must be signed in to change notification settings - Fork 367
Closed
Description
NettyConnector doesn't completes/release executorService threads executor and may even lead to stuck evetLoop under stress if headerKey is invalid (say blank) and error happens in netty while validating those. (reproducer attached)
Issue identified in below code with NettyConnector
Lines 462 to 471 in d9658aa
| jerseyRequest.setStreamProvider(new OutboundMessageContext.StreamProvider() { | |
| @Override | |
| public OutputStream getOutputStream(int contentLength) throws IOException { | |
| replaceHeaders(jerseyRequest, nettyRequest.headers()); // WriterInterceptor changes | |
| setHostHeader(jerseyRequest, nettyRequest); | |
| headersSet.countDown(); | |
| return entityWriter.getOutputStream(); | |
| } | |
| }); |
Here if any exception happens, below code doesn't get executed leading to stuck executorService threads.
Line 467 in d9658aa
| headersSet.countDown(); |
This code needs to be fail safe wrapped under try catch with finally countDown the latch.
Metadata
Metadata
Assignees
Labels
No labels