Skip to content

Commit 6e26539

Browse files
committed
fix condition
1 parent 341da5b commit 6e26539

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

instrumentation/servlet/servlet-3.0/src/main/java/io/opentelemetry/javaagent/instrumentation/hypertrace/servlet/v3_0/nowrapping/Servlet30AndFilterInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public static void exit(
183183

184184
if (!request.isAsyncStarted()) {
185185
if (instrumentationConfig.httpHeaders().response()) {
186-
if (!httpResponse.isCommitted()) {
186+
if (throwable == null && !httpResponse.isCommitted()) {
187187
httpResponse.flushBuffer();
188188
}
189189
for (String headerName : httpResponse.getHeaderNames()) {

0 commit comments

Comments
 (0)