client: drain text output when exiting