From 784cab2daf7ebfe557fe64f55e0dadc2adfce549 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 17 Aug 2020 16:34:39 +0300 Subject: [PATCH] MXS-3114: Fix duplicate listener check Backporting to 2.4. The listener search used the host and port for listeners that used sockets and vice versa. This caused multiple listeners with sockets to fail to be created. --- server/core/config_runtime.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/core/config_runtime.cc b/server/core/config_runtime.cc index 667557c85..b75d14ce7 100644 --- a/server/core/config_runtime.cc +++ b/server/core/config_runtime.cc @@ -1056,8 +1056,8 @@ bool runtime_create_listener(Service* service, std::string reason; SListener old_listener = use_socket ? - listener_find_by_address(params.get_string(CN_ADDRESS), params.get_integer(CN_PORT)) : - listener_find_by_socket(params.get_string(CN_SOCKET)); + listener_find_by_socket(params.get_string(CN_SOCKET)) : + listener_find_by_address(params.get_string(CN_ADDRESS), params.get_integer(CN_PORT)); if (!ok) {