This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 22bc541097cb6700f4c2c5cf2376e25278ad02cf Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Jun 28 19:52:30 2022 +0100 Fix logic for sending HTTP/2 pings --- java/org/apache/coyote/http2/Http2UpgradeHandler.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java b/java/org/apache/coyote/http2/Http2UpgradeHandler.java index d0a9b21724..8e285e17ec 100644 --- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java +++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java @@ -329,7 +329,6 @@ class Http2UpgradeHandler extends AbstractStream implements InternalHttpUpgradeH // Might not be necessary. init() will handle that. init(null); - SocketState result = SocketState.CLOSED; try { @@ -337,7 +336,7 @@ class Http2UpgradeHandler extends AbstractStream implements InternalHttpUpgradeH case OPEN_READ: socketWrapper.getLock().lock(); try { - if (!socketWrapper.canWrite()) { + if (socketWrapper.canWrite()) { // Only send a ping if there is no other data waiting to be sent. // Ping manager will ensure they aren't sent too frequently. pingManager.sendPing(false); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org