Index: main/devicestate.c =================================================================== --- main/devicestate.c (revision 391701) +++ main/devicestate.c (working copy) @@ -774,6 +774,7 @@ static void devstate_cleanup(void) { + devstate_message_sub = stasis_unsubscribe_and_join(devstate_message_sub); ao2_cleanup(device_state_topic_all); device_state_topic_all = NULL; device_state_topic_cached = stasis_caching_unsubscribe_and_join(device_state_topic_cached);