jfreymuth/pulse

Getting sink info with invalid index renders client useless

medusalix opened this issue · 0 comments

Querying the sink info of my main sink (index 0) works just fine. When I try to get the info from a nonexistent sink (index 123), pulse returns no such entity (as expected). However, when I want to get the main sink info again, pulse still returns no such entity despite being passed a valid sink index. I can't query sinks again until I open up a new connection.
I'm not sure if that's a limitation of PulseAudio or this library or some kind of bug on my side.
Minimal code example:

reply := proto.GetSinkInfoReply{}

client.Request(&proto.GetSinkInfo{SinkIndex: 0}, &reply) // Works fine
client.Request(&proto.GetSinkInfo{SinkIndex: 123}, &reply) // No such entity
client.Request(&proto.GetSinkInfo{SinkIndex: 0}, &reply) // No such entity

Thank you for your work on this library!