HA Proxy h2 connection closing logic seems to have issues

This is related to the bug report that I had initially logged and was fixed. https://github.com/haproxy/haproxy/issues/373
I am reopening the issue because seems like although the original issue was fixed, there might be issues with the way the connections are being closed. We are seeing a new issue with the requests timing out (usually starts to appear as the load increases). To reiterate our system landscape, HA Proxy is balancing the traffic between multiple Java backend processes running Tomcat. Upon enabling the tomcat container logs, this is what we could see. Both exceptions show up at the same time. Suspecting this has something to do with the way ha proxy is closing the connections. I haven’t posted the entire stack trace, but if it helps, please let me know. -

org.apache.catalina.connector.ClientAbortException: org.apache.coyote.CloseNowException: Connection [8], Stream [299], This stream is not writable

java.io.IOException: HTTP/2 Stream reset at org.apache.coyote.http2.Stream$StreamInputBuffer.doRead