Skip to content

Commit

Permalink
Server listener and client connections have is_server set.
Browse files Browse the repository at this point in the history
  • Loading branch information
janiversen committed Sep 27, 2024
1 parent 5a75696 commit dcd86c6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion pymodbus/server/async_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, owner):
host=owner.comm_params.source_address[0],
port=owner.comm_params.source_address[1],
)
super().__init__(params, False)
super().__init__(params, True)
self.server = owner
self.running = False
self.receive_queue: asyncio.Queue = asyncio.Queue()
Expand Down
2 changes: 0 additions & 2 deletions test/transport/test_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ def get_port_in_class(base_ports):
@pytest.mark.parametrize("use_comm_type", COMM_TYPES)
async def test_init_client(self, client):
"""Test init client."""
assert not hasattr(client, "active_connections")
assert not client.is_server


@pytest.mark.parametrize("use_comm_type", COMM_TYPES)
async def test_init_server(self, server):
"""Test init server."""
assert not hasattr(server, "unique_id")
assert not server.active_connections
assert server.is_server

Expand Down

0 comments on commit dcd86c6

Please sign in to comment.