diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-05-29 13:56:27 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-07-04 05:35:52 +0200 |
commit | ed9aa225e884dc2a0c857ed1603d3bc3a3758c06 (patch) | |
tree | 7c829ab069e47a13417fb08665644dd08846132d | |
parent | json: use JSON_VARIANT_ARRAY_FOREACH() where we can (diff) | |
download | systemd-ed9aa225e884dc2a0c857ed1603d3bc3a3758c06.tar.xz systemd-ed9aa225e884dc2a0c857ed1603d3bc3a3758c06.zip |
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).
-rw-r--r-- | src/shared/varlink.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/shared/varlink.c b/src/shared/varlink.c index dea8e4363f..4ecb763f08 100644 --- a/src/shared/varlink.c +++ b/src/shared/varlink.c @@ -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; |