fixed close socket