]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Remove assertion in lieu of a log message
authorVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 17 Jul 2023 20:05:33 +0000 (21:05 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 17 Jul 2023 20:06:35 +0000 (21:06 +0100)
Issue: #4533
Closes: #4533
src/lua/lua_config.c

index 680203c1e69b0e54d7ec0612822c8600a387d5f2..e24fb3e7e09c9810a5804c13ce028f94a4263e5c 100644 (file)
@@ -1274,7 +1274,10 @@ lua_metric_symbol_callback (struct rspamd_task *task,
                                res = FALSE;
                        }
                        else {
-                               g_assert_not_reached ();
+                               /* Something bogus has been returned, so we should log it */
+                               msg_err_task ("invalid return value for %s: %s",
+                                               cd->symbol, lua_typename (L, type));
+                               res = FALSE;
                        }
 
                        if (res) {