diff --git a/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c b/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c index 3c92160464..431c3c6093 100644 --- a/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c +++ b/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c @@ -85,6 +85,7 @@ static void do_rotate(cdr_fd_t *fd) size_t len; close(fd->fd); + fd->fd = -1; if (globals.rotate) { switch_time_exp_lt(&tm, switch_timestamp_now());