You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2021/09/15 13:28:33 UTC
[tomcat] 03/05: Move debug statement inside sync block
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit f61a413f176928e50c73831eaa433d71a403119a
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Sep 15 13:52:42 2021 +0100
Move debug statement inside sync block
Ensures that the values logged are consistent with the values processed.
---
java/org/apache/coyote/http2/WindowAllocationManager.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/java/org/apache/coyote/http2/WindowAllocationManager.java b/java/org/apache/coyote/http2/WindowAllocationManager.java
index 96016cc..6c824a5 100644
--- a/java/org/apache/coyote/http2/WindowAllocationManager.java
+++ b/java/org/apache/coyote/http2/WindowAllocationManager.java
@@ -172,12 +172,13 @@ class WindowAllocationManager {
private void notify(int notifyTarget) {
- if (log.isDebugEnabled()) {
- log.debug(sm.getString("windowAllocationManager.notify", stream.getConnectionId(),
- stream.getIdAsString(), Integer.toString(waitingFor), Integer.toString(notifyTarget)));
- }
synchronized (stream) {
+ if (log.isDebugEnabled()) {
+ log.debug(sm.getString("windowAllocationManager.notify", stream.getConnectionId(),
+ stream.getIdAsString(), Integer.toString(waitingFor), Integer.toString(notifyTarget)));
+ }
+
if ((notifyTarget & waitingFor) > NONE) {
// Reset this here so multiple notifies (possible with a
// backlog containing multiple streams and small window updates)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org