close socket if client send close request