Skip to content

Commit ea3662d

Browse files
committed
Polish gh-2971 Adds while loop comment.
1 parent aa88517 commit ea3662d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/filter/RemoveCachedBodyFilter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
4141
log.trace("releasing cached body in exchange attribute");
4242
}
4343
// ensure proper release
44-
while(!dataBuffer.release()) {}
44+
while (!dataBuffer.release()) {
45+
// release() counts down until zero, will never be infinite loop
46+
}
4547
}
4648
}
4749
});

0 commit comments

Comments
 (0)