aboutgitcodebugslistschat
path: root/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/conf.c b/conf.c
index 4a07884..2e18a66 100644
--- a/conf.c
+++ b/conf.c
@@ -2250,7 +2250,12 @@ void conf_handler(struct ctx *c, uint32_t events)
" ", "");
}
- fwd_listen_switch(c);
+ if (fwd_listen_switch(c) < 0) {
+ err("Error switching to new forwarding rules");
+ /* Switch back to old rules (still in c->fwd_pending) */
+ if (fwd_listen_switch(c) < 0)
+ err("Couldn't restore old forwarding rules");
+ }
}
if (events & EPOLLHUP) {