From: Timo Sirainen Date: Tue, 22 Oct 2013 16:12:38 +0000 (+0300) Subject: lib-dns: Fixed busy looping when dns-client disconnected. X-Git-Tag: 2.2.7~66 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28715adb0aa53197a25aac72f1bdd44f44df3cd1;p=thirdparty%2Fdovecot%2Fcore.git lib-dns: Fixed busy looping when dns-client disconnected. --- diff --git a/src/lib-dns/dns-lookup.c b/src/lib-dns/dns-lookup.c index 652185d07d..f0e849ce30 100644 --- a/src/lib-dns/dns-lookup.c +++ b/src/lib-dns/dns-lookup.c @@ -159,10 +159,8 @@ static void dns_client_input(struct dns_client *client) return; } } - if (ret == 0) - return; - if (lookup->result.error != NULL) { + if (ret != 0 && lookup->result.error != NULL) { /* already got the error */ } else if (client->input->stream_errno != 0) { dns_client_disconnect(client, t_strdup_printf(