resolved: make sure we GC stream transactions properly

Make sure to GC a transaction after dealing with a reply, even if the
transaction is not complete yet.
This commit is contained in:
Lennart Poettering 2015-12-26 14:15:51 +01:00
parent 5a7e41a370
commit 598f44bd2c
1 changed files with 2 additions and 0 deletions

View File

@ -342,6 +342,8 @@ static int on_stream_complete(DnsStream *s, int error) {
/* If the response wasn't useful, then complete the transition now */
if (t->state == DNS_TRANSACTION_PENDING)
dns_transaction_complete(t, DNS_TRANSACTION_INVALID_REPLY);
else
dns_transaction_gc(t);
return 0;
}