This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/main by this push:
     new 7ef0a0f  DISPATCH-2091: Ignore RX window when raw connection is 
write_closed
7ef0a0f is described below

commit 7ef0a0f0262a830df35d3bd39b9346c5db56940b
Author: Chuck Rolke <c...@apache.org>
AuthorDate: Fri Apr 30 10:13:25 2021 -0400

    DISPATCH-2091: Ignore RX window when raw connection is write_closed
    
    When TCP adaptor receives an EOS in the incoming streaming link then
    it calls pn_raw_write_close to the corresponding PN raw connection.
    This sends a FIN to the raw connection peer.
    
    If the adaptor then continues to honor the RX window closure then it
    never reads data from the raw connection that now has a close in
    progress. Further, when the incoming TCP window is full then the
    raw connection never returns the client's FIN and the connection
    is stuck open.
    
    This patch causes the adaptor to override backpressure flow control
    and to keep reading from a raw connection after a write_close has been
    effected.
    
    This closes #1177
---
 src/adaptors/tcp_adaptor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/adaptors/tcp_adaptor.c b/src/adaptors/tcp_adaptor.c
index 4a260bb..e75f1ee 100644
--- a/src/adaptors/tcp_adaptor.c
+++ b/src/adaptors/tcp_adaptor.c
@@ -231,7 +231,7 @@ static int handle_incoming_raw_read(qdr_tcp_connection_t 
*conn, qd_buffer_list_t
     int free_count = 0;
     const bool was_open = conn->bytes_unacked < TCP_MAX_CAPACITY;
 
-    while ((count + conn->bytes_unacked < TCP_MAX_CAPACITY)
+    while ((conn->raw_closed_write || count + conn->bytes_unacked < 
TCP_MAX_CAPACITY)
            && (n = pn_raw_connection_take_read_buffers(conn->pn_raw_conn, 
raw_buffers, READ_BUFFERS)) ) {
 
         for (size_t i = 0; i < n && raw_buffers[i].bytes; ++i) {

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to