Skip to content

Commit

Permalink
PROTON-2275: Fixed idle_timeout connection option not working for SSL…
Browse files Browse the repository at this point in the history
… connections.
  • Loading branch information
Attila Kun authored and Attila Kun committed Sep 1, 2020
1 parent 9a43b8b commit 09e6e3e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions c/src/ssl/schannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1765,6 +1765,12 @@ static ssize_t process_output_ssl( pn_transport_t *transport, unsigned int layer
if (!ssl) return PN_EOS;
ssl_log( transport, PN_LEVEL_TRACE, "process_output_ssl( max_len=%d )",max_len );

// This is to match the behaviour of pn_output_write_amqp defined in transport.c.
// Without this, the idle_timeout connection option does not work in case of an SSL connection.
if (!pn_buffer_size(transport->output_buffer) && transport->close_sent) {
return PN_EOS;
}

ssize_t written = 0;
ssize_t total_app_bytes = 0;
bool work_pending;
Expand Down

0 comments on commit 09e6e3e

Please sign in to comment.