Fix 'WriteToConn' object has no attribute 'flush'
#16801
Merged
'WriteToConn' object has no attribute 'flush'
#16801