close socket after request