Any command that requires a ring sync should cause the doveadm connection to
wait until the ring is synced. However, if the disconnection happened early
enough the connection is deinitialized before the ring sync is finished.
Fixes:
Panic: file doveadm-connection.c: line 1097 (doveadm_connection_deinit): assertion failed: (conn->to_ring_sync_abort == NULL)
ret = doveadm_connection_cmd(conn, line);
} T_END;
}
- if (conn->input->eof || conn->input->stream_errno != 0 ||
- ret == DOVEADM_DIRECTOR_CMD_RET_FAIL)
+ /* Delay deinit if io was removed, even if the client
+ already disconnected. */
+ if (conn->io != NULL &&
+ (conn->input->eof || conn->input->stream_errno != 0 ||
+ ret == DOVEADM_DIRECTOR_CMD_RET_FAIL))
doveadm_connection_deinit(&conn);
}