tried to close socket when shutdown server