diff --git a/recording-daemon/db.c b/recording-daemon/db.c index f4d4c6df5..f7cc88c7d 100644 --- a/recording-daemon/db.c +++ b/recording-daemon/db.c @@ -159,6 +159,8 @@ INLINE void my_d(MYSQL_BIND *b, const double *d) { static void execute_wrap(MYSQL_STMT **stmt, MYSQL_BIND *binds, unsigned long long *auto_id) { int retr = 0; while (1) { + if (check_conn()) + goto err; if (mysql_stmt_bind_param(*stmt, binds)) goto err; if (mysql_stmt_execute(*stmt))