Skip to content

Commit e07e01e

Browse files
committed
#368 Fixes minor bug in broadcast support code
1 parent 60aca50 commit e07e01e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymodbus/server/sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ def execute(self, request):
5858
5959
:param request: The decoded request message
6060
"""
61+
broadcast = False
6162
try:
6263
if self.server.broadcast_enable and request.unit_id == 0:
6364
broadcast = True
6465
# if broadcasting then execute on all slave contexts, note response will be ignored
6566
for unit_id in self.server.context.slaves():
6667
response = request.execute(self.server.context[unit_id])
6768
else:
68-
broadcast = False
6969
context = self.server.context[request.unit_id]
7070
response = request.execute(context)
7171
except NoSuchSlaveException as ex:

0 commit comments

Comments
 (0)