Ensure a Secure Channel always remains available for discovery features
Description
It is expected that the number of secures channels available is greater than the number of sessions to guarantee at least one secure channel remains available for discovery services on discovery endpoint.
Analysis
The server accepts more secure channel connections than the maximum number defined in order to allow an attempt to close secure channels without sessions if it is possible. But in case it is not, the newly created secure channel is immediately closed because maximum number is reached. This behavior complies with the fact to close the unused secure channels but it does not allow to call discovery services if both secure channels and sessions maximum is equal and all sessions are actually created. By adding a constraint that the maximum number of secure channels is greater than the maximum number of sessions, it is then possible to guarantee to keep at least 1 possible connection to discovery services.
Implementation
Define the default value for maximum number of secure channel to be the maximum number of sessions plus 1. Add a compilation time check that the maximum number of secure channel is always greater than the maximum number of sessions.