From d3fd0d391698b467270576203d3b1189cc0c1145 Mon Sep 17 00:00:00 2001 From: Pablo Hinojosa Date: Tue, 9 Mar 2021 02:25:41 +0100 Subject: [PATCH] Show the port number which is not able to connect --- service/OneService.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/service/OneService.cpp b/service/OneService.cpp index 8c0e64e97..6156e46bb 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -676,6 +676,9 @@ public: readLocalSettings(); applyLocalConfig(); + // Save original port number to show it if bind error + const int _configuredPort = _primaryPort; + // Make sure we can use the primary port, and hunt for one if configured to do so const int portTrials = (_primaryPort == 0) ? 256 : 1; // if port is 0, pick random for(int k=0;k