Skip to content

Commit

Permalink
fix(core): increase maxSecureChannels to 100, fix check for enough ch…
Browse files Browse the repository at this point in the history
…annels

Increase maxSecureChannels to 100 and change the check for enough
SecureChannels to not give a warning if maxSessions==maxSecureChannels.

Signed-off-by: Florian La Roche <[email protected]>
  • Loading branch information
laroche authored and jpfr committed Sep 4, 2024
1 parent b6c8441 commit ebe5e42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/ua_config_default.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ setDefaultConfig(UA_ServerConfig *conf, UA_UInt16 portNumber) {
conf->modellingRulesOnInstances = true;

/* Limits for SecureChannels */
conf->maxSecureChannels = 40;
conf->maxSecureChannels = 100;
conf->maxSecurityTokenLifetime = 10 * 60 * 1000; /* 10 minutes */

/* Limits for Sessions */
Expand Down
2 changes: 1 addition & 1 deletion src/server/ua_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ UA_Server_run_startup(UA_Server *server) {

/* Are there enough SecureChannels possible for the max number of sessions? */
if(config->maxSecureChannels != 0 &&
(config->maxSessions == 0 || config->maxSessions >= config->maxSecureChannels)) {
(config->maxSessions == 0 || config->maxSessions > config->maxSecureChannels)) {
UA_LOG_WARNING(config->logging, UA_LOGCATEGORY_SERVER,
"Maximum SecureChannels count not enough for the "
"maximum Sessions count");
Expand Down

0 comments on commit ebe5e42

Please sign in to comment.