Closed njavilas2015 closed 3 years ago
Hi,
There indeed wasn't such option, but simple enough to add, so added in 96cfaec along with a couple tests for it.
With 21.3.4, something like this should work:
with pulsectl.Pulse('myclient', server='tcp4:my-remote-ip:my-port', connect=False) as pulse:
pulse.connect(timeout=20) # will raise pulsectl.PulseError on timeout
...
(note that if attempt fails with timeout, you can retry pulse.connect()
call there, if necessary)
Thanks for reporting.
connect() got an unexpected keyword argument 'timeout'
You seem to have removed the msg, so guess probably just forgot to update the module there.
with pulsectl.Pulse('myclient', server='tcp4:192.168.88.254:4713', connect=False) as pulse:
Btw, don't think you have to spell it out as tcp4:<host>:<port>
- "man pulseaudio" says that prefix and port are optional, just used that notation in tests to make ipv4/ipv6 distinction clear.
hello I wanted to know how to implement a timeout for the connection My application is simple but I need to know quickly if it is possible to connect with the remote pulse pulse = pulsectl.Pulse(server = 'ip_remote')