Skip to content

Commit ad31c53

Browse files
Attila KunAttila Kun
authored andcommitted
Fixed idle_timeout connection option not working for SSL connections.
1 parent b34bbea commit ad31c53

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

c/src/ssl/schannel.c

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

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

0 commit comments

Comments
 (0)