balena-io-experimental / audio

Audio building block for balenaOS, based on pulseaudio.
https://hub.balena.io/blocks
31 stars 13 forks source link

lib: add retries to the connect method #34

Closed tmigone closed 2 years ago

tmigone commented 4 years ago

The audio block takes a few seconds to startup so adding a few retries to the connect method would allow it enough time to initialise for applications that rely on it during startup. Example: connect requires /run/pulse/pulseaudio.cookie file to extist.

tmigone commented 2 years ago

Implemented here: https://github.com/balena-io-modules/balena-audio/blob/4258e2605ff1693f6840fd97fbcb48d3734b05e9/lib/index.ts#L56-L62