Handle comments consistently in desktop socket protocol settings

This commit is contained in:
evgeny committed 2026-10-25 16:35:54 +01:00
1 parent 7bcdccc4d6
commit c26b626c35
3 files changed
+11 -5

No files matched your search

+1 -1
View File
@@ -314,7 +314,7 @@ bool NodeConfig::load() {
else if (key == "my_private_key") m_privKey = val;
else if (key == "auto_sockets") m_autoSockets = (val.compare("yes", Qt::CaseInsensitive) == 0 || val == "1");
else if (key == "auto_socket_protocols") {
const QString protocols = val.toLower();
const QString protocols = val.section('#', 0, 0).section(';', 0, 0).trimmed().toLower();
if (protocols == "tcp" || protocols == "udp" || protocols == "tcp+udp") m_autoSocketProtocols = protocols;
else {
m_errors.append(QString("line %1: invalid auto_socket_protocols='%2'; expected tcp, udp or tcp+udp")