diff --git a/distributed/deploy/local.py b/distributed/deploy/local.py index 554459e43ac..cb1a1511e20 100644 --- a/distributed/deploy/local.py +++ b/distributed/deploy/local.py @@ -12,6 +12,7 @@ from .spec import SpecCluster from ..nanny import Nanny from ..scheduler import Scheduler +from ..security import Security from ..worker import Worker, parse_memory_limit logger = logging.getLogger(__name__) @@ -123,11 +124,12 @@ def __init__( self.status = None self.processes = processes + security = security or Security() if protocol is None: if host and "://" in host: protocol = host.split("://")[0] - elif security: + elif security and security.require_encryption: protocol = "tls://" elif not self.processes and not scheduler_port: protocol = "inproc://"