[PR #420] [MERGED] fix(audio): set the pulse on_ready promise at most once #454

Closed
opened 2026-10-15 13:00:42 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/wolf/pull/420
Author: @JBailes
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/7/2026
Merged by: @ABeltramo

Base: stable ← Head: fix/pulse-set-value-once


📝 Commits (1)

  • 805a3fe fix(audio): set the pulse on_ready promise at most once

📊 Changes

1 file changed (+21 additions, -3 deletions)

View changed files

📝 src/core/src/platforms/linux/pulseaudio/pulse.cpp (+21 -3)

📄 Description

The PA context state callback resolves on_ready for READY/TERMINATED/FAILED. A boost::promise can only be set once, so a connection that goes READY
then later TERMINATED (PulseAudio server going away) calls set_value twice and throws promise_already_satisfied, which is unhandled and crashes Wolf. Guard
on_ready with a one-shot flag, reset in disconnect() when the promise is recreated.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/wolf/pull/420 **Author:** [@JBailes](https://github.com/JBailes) **Created:** 6/4/2026 **Status:** ✅ Merged **Merged:** 6/7/2026 **Merged by:** [@ABeltramo](https://github.com/ABeltramo) **Base:** `stable` ← **Head:** `fix/pulse-set-value-once` --- ### 📝 Commits (1) - [`805a3fe`](https://github.com/games-on-whales/wolf/commit/805a3fecc3cf94cc6998719d7e8bfe4b8e233621) fix(audio): set the pulse on_ready promise at most once ### 📊 Changes **1 file changed** (+21 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/core/src/platforms/linux/pulseaudio/pulse.cpp` (+21 -3) </details> ### 📄 Description The PA context state callback resolves on_ready for READY/TERMINATED/FAILED. A boost::promise can only be set once, so a connection that goes READY then later TERMINATED (PulseAudio server going away) calls set_value twice and throws promise_already_satisfied, which is unhandled and crashes Wolf. Guard on_ready with a one-shot flag, reset in disconnect() when the promise is recreated. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 13:00:42 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/wolf#454
No description provided.