Commit fb8131a
committed
fix(pulseaudio): suppress disconnect error during Stream::drop teardown
The play_all driver thread surfaces ClientError::Disconnected when the
reactor drops the source's eof_tx — which happens not only on real
server disconnect but also as a *direct consequence* of Stream::drop
queueing DeletePlaybackStream and the server processing it. The error
callback then fires "PulseAudio client disconnected" on every clean
teardown, despite the connection being healthy.
Check the cancel flag in the play_all spawn before emit_error,
mirroring the latency thread's existing pre-poll cancel check. After a
clean Stream::drop the cancel flag is already set when play_all
unblocks, so the spurious notification is silenced; real disconnects
(reactor exits, socket closed) leave the flag clear and still surface
through the user's error_callback.1 parent 3fecb31 commit fb8131a
2 files changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
244 | 245 | | |
245 | 246 | | |
246 | 247 | | |
| |||
250 | 251 | | |
251 | 252 | | |
252 | 253 | | |
253 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
254 | 260 | | |
255 | 261 | | |
256 | 262 | | |
| |||
0 commit comments