summaryrefslogtreecommitdiffstats
path: root/daemon/session2.c
diff options
context:
space:
mode:
authorOto Šťáva <oto.stava@nic.cz>2023-03-22 10:07:08 +0100
committerOto Šťáva <oto.stava@nic.cz>2023-03-22 10:07:08 +0100
commit2452fead9872476af746137e9ad5af205e9f2351 (patch)
tree3e32dd92490f140f1aef52e56e839b4824147000 /daemon/session2.c
parentdaemon/session2: rename http flag to custom_emalf_handling (diff)
downloadknot-resolver-2452fead9872476af746137e9ad5af205e9f2351.tar.xz
knot-resolver-2452fead9872476af746137e9ad5af205e9f2351.zip
daemon: fix assertion errors on duplicate peers
Not sure if this is completely correct.
Diffstat (limited to 'daemon/session2.c')
-rw-r--r--daemon/session2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/daemon/session2.c b/daemon/session2.c
index 278e7489..5df2dfcf 100644
--- a/daemon/session2.c
+++ b/daemon/session2.c
@@ -436,6 +436,11 @@ static int protolayer_step(struct protolayer_iter_ctx *ctx)
protolayer_iter_cb cb = (ctx->direction == PROTOLAYER_UNWRAP)
? globals->unwrap : globals->wrap;
+ if (ctx->manager->session->closing) {
+ return protolayer_iter_ctx_finish(
+ ctx, kr_error(ECANCELED));
+ }
+
if (cb) {
struct protolayer_data *sess_data = protolayer_sess_data_get(
ctx->manager, ctx->layer_ix);