corrected client connection flush and stop