eclipse / paho.mqtt.testing

An Eclipse Paho project - a Python broker for testing
https://eclipse.org/paho
Other
108 stars 73 forks source link

startbroker --port option not obeyed #69

Open harmv opened 3 years ago

harmv commented 3 years ago

startbroker.py has an option --port, but thats ignored

h3. steps to reproduce

paho.mqtt.testing/interoperability/startbroker.py --port=1889

or

paho.mqtt.testing/interoperability/startbroker.py --port 1889

h3. expected result

a broker is started that listens on port 1889

h3. actual result

The startbroker.py always binds on 1883, no matter what --port option is given

INFO 20210121 173113 Starting TCP listener on address '' port 1883

h3. version

2873885d7e840b4e06483f36f170c609eb30527d (Fri Oct 2 19:16:08 2020 +0100)

wolkenarchitekt commented 2 years ago

Indeed paho.mqtt.testing ignores all configs, settings and parameters to set port or host. This change I made demonstrates a minimal modification to the code that will properly set the host/port in a very hacky way: https://github.com/wolkenarchitekt/paho.mqtt.testing/commit/90e5368128da3cf74422fbab69196608ae71e3cf Fixing this properly will take a longer time, due to the code "structure" of paho.mqtt.testing.