What happened:
The MQTT push method calls os.Exit(1) when the broker connection fails. Since this code runs inside the virtual protocol process, one unavailable broker terminates the whole mapper instead of allowing the process to continue and handle later device events.
What I expected to happen:
A failed MQTT connection should be logged and the current publish attempt should return without terminating the mapper process.
How to reproduce it (as minimally and precisely as possible):
- Configure the MQTT push method with an invalid broker address.
- Start the virtual protocol and publish a device value.
- Observe that the process exits from the push method.
A focused regression test exercises the invalid broker path and completes without process termination after the fix.
Anything else we need to know?:
The change only replaces process termination with error logging and an early return.
What happened:
The MQTT push method calls
os.Exit(1)when the broker connection fails. Since this code runs inside the virtual protocol process, one unavailable broker terminates the whole mapper instead of allowing the process to continue and handle later device events.What I expected to happen:
A failed MQTT connection should be logged and the current publish attempt should return without terminating the mapper process.
How to reproduce it (as minimally and precisely as possible):
A focused regression test exercises the invalid broker path and completes without process termination after the fix.
Anything else we need to know?:
The change only replaces process termination with error logging and an early return.