shutdown client before drop (avoid leak)