r7sa / megad-mqtt-gw

Gateway between MQTT queue and MegaD-328/2561 devices (http://ab-log.ru)
8 stars 4 forks source link

make shutdown procedure correct #6

Closed r7sa closed 7 years ago

r7sa commented 7 years ago

Now the shutdown procedure is incorrect. The loop used after stopping, the http server does not stop hsndling requests and it serms possible to awoid use of sleep.

r7sa commented 7 years ago

Use call later for async main. Use loop forever instead until run. In stop signal handler: -Unset servers in device on stopping. -stop loop -Call sync stop functions of servers.

r7sa commented 7 years ago

done