Skip to content

Commit

Permalink
director: Fix assert-crash when flush script takes too long
Browse files Browse the repository at this point in the history
Fixes:
Panic: file director.c: line 966 (director_user_move_timeout): assertion failed: (user->kill_ctx->kill_state != USER_KILL_STATE_FLUSHING)
  • Loading branch information
sirainen committed Jan 10, 2017
1 parent 769cbb6 commit 6ce2e6f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/director/director.c
Expand Up @@ -966,7 +966,6 @@ static void director_user_move_throttled(unsigned int new_events_count,
static void director_user_move_timeout(struct user *user)
{
i_assert(user->kill_ctx != NULL);
i_assert(user->kill_ctx->kill_state != USER_KILL_STATE_FLUSHING);
i_assert(user->kill_ctx->kill_state != USER_KILL_STATE_DELAY);

if (log_throttle_accept(user_move_throttle)) {
Expand All @@ -975,6 +974,10 @@ static void director_user_move_timeout(struct user *user)
user->username_hash,
user_kill_state_names[user->kill_ctx->kill_state]);
}
if (user->kill_ctx->kill_state == USER_KILL_STATE_FLUSHING) {
o_stream_unref(&user->kill_ctx->reply);
program_client_destroy(&user->kill_ctx->pclient);
}
director_user_move_free(user);
}

Expand Down

0 comments on commit 6ce2e6f

Please sign in to comment.