diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp index 9e2b13f515524..351056d8beb48 100644 --- a/src/activemasternode.cpp +++ b/src/activemasternode.cpp @@ -67,7 +67,10 @@ void CActiveMasternode::ManageStatus() return; } } else { - service = LookupNumeric(strMasterNodeAddr.c_str(), GetListenPort()); + int nPort; + std::string strHost; + SplitHostPort(strMasterNodeAddr, nPort, strHost); + service = LookupNumeric(strHost.c_str(), nPort); } // The service needs the correct default port to work properly