Skip to content

Commit 6add56b

Browse files
authored
Merge pull request #350 from avinxshKD/fix/concoredocker-zmq-write-fallthrough
fix: add missing return in concoredocker.py write() after ZMQ send
2 parents 2aa2b5c + 2081299 commit 6add56b

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

concoredocker.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,20 @@ def write(port_identifier, name, val, delta=0):
276276
if isinstance(port_identifier, str) and port_identifier in zmq_ports:
277277
zmq_p = zmq_ports[port_identifier]
278278
try:
279-
zmq_p.send_json_with_retry(val)
279+
zmq_val = convert_numpy_to_python(val)
280+
if isinstance(zmq_val, list):
281+
# Prepend simtime to match file-based write behavior
282+
payload = [simtime + delta] + zmq_val
283+
zmq_p.send_json_with_retry(payload)
284+
simtime += delta
285+
else:
286+
zmq_p.send_json_with_retry(zmq_val)
280287
except zmq.error.ZMQError as e:
281288
logging.error(f"ZMQ write error on port {port_identifier} (name: {name}): {e}")
282289
except Exception as e:
283290
logging.error(f"Unexpected error during ZMQ write on port {port_identifier} (name: {name}): {e}")
284-
291+
return
292+
285293
try:
286294
file_port_num = int(port_identifier)
287295
file_path = os.path.join(outpath, str(file_port_num), name)

0 commit comments

Comments
 (0)