sd-varlink: allow that method handles call sd_varlink_close()

It's fine if a method handler closes the connection, deal with it
gracefully.
This commit is contained in:
Lennart Poettering 2024-11-07 15:19:13 +01:00
parent 20c03ed72b
commit 0df42ebcd6

View File

@ -1420,6 +1420,9 @@ static int varlink_dispatch_method(sd_varlink *v) {
varlink_set_state(v, VARLINK_PENDING_METHOD_MORE);
break;
case VARLINK_DISCONNECTED: /* Handler called sd_varlink_close() on us, which is fine */
break;
default:
assert_not_reached();
}