BI-154 Fix isLocal detection

This commit is contained in:
proller 2018-11-17 21:52:47 +03:00
parent 65b2812343
commit ddf231e57f

View File

@ -301,7 +301,11 @@ bool DDLWorker::initAndCheckTask(const String & entry_name, String & out_reason)
for (const HostID & host : task->entry.hosts)
{
auto maybe_secure_port = context.getTCPPortSecure();
bool is_local_port = maybe_secure_port ? host.isLocalAddress(*maybe_secure_port) : host.isLocalAddress(context.getTCPPort());
bool is_local_port = false;
if (maybe_secure_port)
is_local_port = host.isLocalAddress(*maybe_secure_port);
if (!is_local_port)
is_local_port = host.isLocalAddress(context.getTCPPort());
if (!is_local_port)
continue;