]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/worker: simplify condition
authorTomas Krizek <tomas.krizek@nic.cz>
Tue, 8 Sep 2020 08:53:57 +0000 (10:53 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 13 Oct 2020 10:55:27 +0000 (12:55 +0200)
daemon/worker.c

index 66bbe98a04700ecaedc2d60772e2fa0a203bc22b..c1aa13d35b0818cdf85c7ed7465c16d180276fcc 100644 (file)
@@ -1612,10 +1612,11 @@ int worker_submit(struct session *session, const struct sockaddr *peer, knot_pkt
        /* Ignore badly formed queries. */
        if ((ret != kr_ok() && ret != kr_error(EMSGSIZE)) ||
            (is_query == is_outgoing)) {
-               if (!is_outgoing)
+               if (!is_outgoing) {
                        the_worker->stats.dropped += 1;
-               if (!is_outgoing && http_ctx)
-                       queue_pop(http_ctx->streams);
+                       if (http_ctx)
+                               queue_pop(http_ctx->streams);
+               }
                return kr_error(EILSEQ);
        }