Skip to content

[Problem]: No active_end published when Shairport is gracefully shutdown #1647

@mill1000

Description

@mill1000

What happened?

When Shairport Sync is shutdown gracefully it publishes a play_end message via MQTT. Instead I would expect an active_end message to be published as a shutdown is more like termination of an session than the stopping of a track.

Relevant log output

         0.015104219 "shairport.c:1690" exit on SIGINT
         0.001073906 "rtsp.c:5294" rtsp_listen_loop_cleanup_handler called.
         0.000230781 "rtsp.c:724" Connection 2: cancelled.
         0.000078125 "rtsp.c:4973" Connection 2: rtsp_conversation_thread_func_cleanup_function called.
         0.004356979 "audio_alsa.c:1844" alsa: do_close()
         0.010486875 "audio_alsa.c:1857" alsa: do_close() -- closing alsa handle
         0.025824844 "player.c:1772" Cancelling AP1 timing, control and audio threads...
         0.000580365 "rtp.c:320" Control Receiver Cleanup Done.
         0.000747604 "player.c:1820" Connection 2: player terminated.
         0.000364791 "mqtt.c:108" [MQTT]: publishing under stereoberry/shairport/play_end
         0.000222188 "rtsp.c:540" Connection 2: release play lock.
         0.000029948 "rtsp.c:546" Connection 2: play lock released.
         0.000139531 "rtsp.c:5004" Connection 2 Closed by self: from 10.100.1.121:48964 to self at 10.100.1.3:5000.
         0.000373958 "rtsp.c:5063" Connection 2: Closed.
         0.000270417 "rtsp.c:733" Connection 2: joined.
         0.000035365 "rtsp.c:5300" closing socket 10.
         0.000228385 "rtsp.c:5300" closing socket 11.
         0.000307500 "shairport.c:1534" exit function called...
         0.000028021 "shairport.c:1557" Stopping D-Bus Loop Thread
         0.000088802 "shairport.c:1502" g_main_loop thread exit
         0.000573333 "shairport.c:1565" Stopping D-Bus Loop Thread Done
         0.000032396 "shairport.c:1570" Stopping DACP Monitor
         0.000023438 "dacp.c:990" dacp_monitor_stop
         0.000299531 "shairport.c:1572" Stopping DACP Monitor Done
         0.000101875 "shairport.c:1576" Stopping metadata hub
         0.000023958 "shairport.c:1578" Stopping metadata done
         0.000021979 "shairport.c:1582" Stopping metadata
         0.000021459 "rtsp.c:4159" metadata_stop called.
         0.000113073 "rtsp.c:380" Deleting metadata queue "mqtt".
         0.000301041 "rtsp.c:380" Deleting metadata queue "hub".
         0.000329792 "rtsp.c:380" Deleting metadata queue "multicast".
         0.000269010 "rtsp.c:380" Deleting metadata queue "pipe".
         0.000235625 "shairport.c:1584" Stopping metadata done
         0.000029115 "shairport.c:1586" Stopping the activity monitor.
         0.000213125 "activity_monitor.c:244" activity_monitor_stop complete
         0.000025365 "shairport.c:1588" Stopping the activity monitor done.
         0.000023020 "shairport.c:1591" Deinitialise the audio backend.
         0.000025730 "audio_alsa.c:1381" Cancel buffer monitor thread.
         0.000258958 "shairport.c:1593" Deinitialise the audio backend done.
         0.000028490 "shairport.c:1599" Waiting for SoXr timecheck to terminate...
         0.000111718 "shairport.c:1602" Waiting for SoXr timecheck to terminate done
         0.001338334 "mdns_avahi.c:517" avahi_dacp_monitor_stop Avahi DACP monitor successfully stopped
         0.000058854 "mdns_avahi.c:414" avahi_unregister.
         0.000025208 "mdns_avahi.c:416" avahi: stop the threaded poll.
         0.000555156 "mdns_avahi.c:420" avahi: free the client.
         0.000156355 "mdns_avahi.c:426" avahi: free the threaded poll.
         0.000065989 "mdns_avahi.c:434" avahi: free the service name.
         0.000023594 "mdns_avahi.c:441" avahi: free the ap2 service_name.
         0.000020781 "mdns_avahi.c:447" avahi free text_record_string_list
         0.000028490 "shairport.c:1670" normal exit

Configuration Information.

Linux StereoBerry 5.15.84-v7+ #1613 SMP Thu Jan 5 11:59:48 GMT 2023 armv7l GNU/Linux
4.1-alac-OpenSSL-Avahi-ALSA-soxr-metadata-mqtt-mpris-sysconfdir:/etc

How did you install Shairport Sync?

Built from source

Check previous issues

  • Confirm

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions