Commit 7a815b72 by James Cammarata

Force connection to local when localhost is delegated to

parent 97e8d25e
......@@ -358,7 +358,9 @@ class PlayContext(Base):
if connection_type in delegated_vars:
break
else:
if getattr(new_info, 'connection', None) == 'local' and new_info.remote_addr not in C.LOCALHOST:
if new_info.remote_addr in C.LOCALHOST:
setattr(new_info, 'connection', 'local')
elif getattr(new_info, 'connection', None) == 'local' and new_info.remote_addr not in C.LOCALHOST:
setattr(new_info, 'connection', C.DEFAULT_TRANSPORT)
elif task._local_action:
# otherwise, in the special instance that the task was specified
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment