Skip to content

Commit

Permalink
Fixed idle_timeout connection option not working for SSL connections.
Browse files Browse the repository at this point in the history
  • Loading branch information
Attila Kun authored and Attila Kun committed Jun 1, 2020
1 parent b34bbea commit ad31c53
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions c/src/ssl/schannel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1763,6 +1763,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 ad31c53

Please sign in to comment.