diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-12-04 22:17:49 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-12-07 17:22:59 +0100 |
commit | 7172e4ee1ea27c33f8d125132a7498f1182ea784 (patch) | |
tree | 36558e81e1363a9cca0cd85d147d16120a0c062f /src/resolve/resolved-dns-stream.c | |
parent | 808089ae3d96f0e015e323188f0795c3446d3b96 (diff) | |
download | systemd-7172e4ee1ea27c33f8d125132a7498f1182ea784.tar.gz |
resolved: implicitly disconnect a stream from its server when a stream is closed
Previously, the callback function did this, but let's do this in the
caller instead, to make this more robust, and use our new helper
function for it.
Diffstat (limited to 'src/resolve/resolved-dns-stream.c')
-rw-r--r-- | src/resolve/resolved-dns-stream.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-stream.c b/src/resolve/resolved-dns-stream.c index 8bca32d253..aee339a4c8 100644 --- a/src/resolve/resolved-dns-stream.c +++ b/src/resolve/resolved-dns-stream.c @@ -64,6 +64,8 @@ static int dns_stream_complete(DnsStream *s, int error) { #endif dns_stream_stop(s); + dns_stream_detach(s); + if (s->complete) s->complete(s, error); else /* the default action if no completion function is set is to close the stream */ |