spa: varlink: Set a default read timeout for sync calls

Makes sure we don't end up blocking forever, and timeouts are treated as
errors.
This commit is contained in:
Arun Raghavan 2026-04-24 11:54:48 -07:00
parent 7fb515d3ee
commit 4f798754e5
4 changed files with 17 additions and 11 deletions

View file

@ -236,7 +236,7 @@ int main(int argc, char *argv[])
if (sync) {
char *reply;
res = spa_varlink_client_call_sync(data.client, argv[2], argv[3], &reply);
res = spa_varlink_client_call_sync(data.client, argv[2], argv[3], &reply, 1000);
if (res < 0) {
printf("Call failed: %s\n", spa_strerror(res));
return -1;