bug related to close socket