Skip to content

Commit 09e6e3e

Browse files
Attila KunAttila Kun
authored andcommitted
PROTON-2275: Fixed idle_timeout connection option not working for SSL connections.
1 parent 9a43b8b commit 09e6e3e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

c/src/ssl/schannel.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,6 +1765,12 @@ static ssize_t process_output_ssl( pn_transport_t *transport, unsigned int layer
17651765
if (!ssl) return PN_EOS;
17661766
ssl_log( transport, PN_LEVEL_TRACE, "process_output_ssl( max_len=%d )",max_len );
17671767

1768+
// This is to match the behaviour of pn_output_write_amqp defined in transport.c.
1769+
// Without this, the idle_timeout connection option does not work in case of an SSL connection.
1770+
if (!pn_buffer_size(transport->output_buffer) && transport->close_sent) {
1771+
return PN_EOS;
1772+
}
1773+
17681774
ssize_t written = 0;
17691775
ssize_t total_app_bytes = 0;
17701776
bool work_pending;

0 commit comments

Comments
 (0)