close socket connection