Context: Return early from connectToDaemon when already connected
ClosedPublic

Authored by drosca on Jun 19 2017, 7:02 PM.

Details

Summary

connectToDaemon is called after 1 second delay when PulseAudio context
becomes invalid, but it is also called when PulseAudio service registers
on DBus.

In case when PulseAudio crashes and immediately restarts, the delayed
call to connectToDaemon will be called when already connected which will
open second connection and leak the first one.
It also leads to assert with debug build.

BUG: 381411

Test Plan

Restarted pulseaudio, plasma-pa reconnected

Diff Detail

Repository
R115 Plasma Audio Volume Applet
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
drosca created this revision.Jun 19 2017, 7:02 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 19 2017, 7:02 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.Jun 19 2017, 7:12 PM
This revision is now accepted and ready to land.Jun 19 2017, 7:12 PM
This revision was automatically updated to reflect the committed changes.