close tcp conn in time