Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HITL - Add configuration to enable new connections by default. #1960

Merged
merged 1 commit into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ def __init__(self, networking_config) -> None:
self._connection_record_queue: Queue[ConnectionRecord] = Queue()
self._disconnection_record_queue: Queue[DisconnectionRecord] = Queue()
self._kick_signal_queue: Queue[int] = Queue()
self._allow_new_connections = Value("b", False)

self._allow_new_connections = Value(
"b", networking_config.enable_connections_by_default
)

def enable_new_connections(self, enabled: bool):
"""Signal the networking process whether it should accept new connections."""
Expand Down
3 changes: 3 additions & 0 deletions habitat-hitl/habitat_hitl/config/hitl_defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ habitat_hitl:
# Number of accepted concurrent clients (multiplayer if higher than one). All connections beyond this count will be rejected. Beware that this can be different from the agent count.
max_client_count: 1

# Accept incoming connections by default. If disabled, connections must be activated using InterprocessRecord.enable_new_connections().
enable_connections_by_default: True

# We'll listen for incoming client connections at this port.
port: 8888

Expand Down