Skip to content

Commit

Permalink
dont subscribe to valid address specs
Browse files Browse the repository at this point in the history
  • Loading branch information
cjjacks committed Oct 24, 2024
1 parent 1ccef5a commit 8291dab
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ait/core/server/broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import ait.core.server
from ait.core import log
from .config import ZmqConfig
from .utils import is_valid_address_spec


class Broker(gevent.Greenlet):
Expand Down Expand Up @@ -69,7 +70,11 @@ def _subscribe_all(self):
"""
for stream in self.inbound_streams + self.outbound_streams:
for input_ in stream.inputs:
if not type(input_) is int and input_ is not None:
if (
not type(input_) is int
and input_ is not None
and not is_valid_address_spec(input_)
):
Broker.subscribe(stream, input_)

for plugin in self.plugins:
Expand Down
8 changes: 8 additions & 0 deletions docker/network-test-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ default:
- input_stream_debug_1
- input_stream_debug_2
- input_stream_debug_3
- input_stream_debug_5
handlers:
- name: ait.core.server.handlers.DebugHandler
handler_name: "Input Stream Handler"
Expand Down Expand Up @@ -45,6 +46,13 @@ default:
- name: ait.core.server.handlers.DebugHandler
handler_name: "TCP Input Client Stream 3"

- stream:
name: input_stream_debug_5
input: 6969
handlers:
- name: ait.core.server.handlers.DebugHandler
handler_name: "TCP Input Client Stream 4"

outbound-streams:
- stream:
name: output_stream_debug_1
Expand Down

0 comments on commit 8291dab

Please sign in to comment.