varlink: allow using varlink_wait() even with a server

This call can be useful even if a server object is declared.

(Originally this was not supported, because a server typically needs to
handle multiple connections, and thus a synchronous wait on one would
starve the others out. But in some cases it might make sense to have
varlink point-to-point connections — i.e. where the server only handles
a single connection ever — and there it makes sense to synchronously
wait on the one connection).
This commit is contained in:
Lennart Poettering 2019-05-29 13:56:27 +02:00 committed by Yu Watanabe
parent ca5e7694bd
commit ed9aa225e8
1 changed files with 0 additions and 1 deletions

View File

@ -1002,7 +1002,6 @@ int varlink_wait(Varlink *v, usec_t timeout) {
usec_t t;
assert_return(v, -EINVAL);
assert_return(!v->server, -ENOTTY);
if (v->state == VARLINK_DISCONNECTED)
return -ENOTCONN;