Display time out message only on SIGALRM.

pull/1694/head
Roger A. Light 5 years ago
parent b726e2f1ec
commit c766bdfeb0

@ -49,6 +49,8 @@ void my_signal_handler(int signum)
if(signum == SIGALRM || signum == SIGTERM || signum == SIGINT){ if(signum == SIGALRM || signum == SIGTERM || signum == SIGINT){
process_messages = false; process_messages = false;
mosquitto_disconnect_v5(mosq, MQTT_RC_DISCONNECT_WITH_WILL_MSG, cfg.disconnect_props); mosquitto_disconnect_v5(mosq, MQTT_RC_DISCONNECT_WITH_WILL_MSG, cfg.disconnect_props);
}
if(signum == SIGALRM){
timed_out = true; timed_out = true;
} }
} }

Loading…
Cancel
Save