Remove unnecessary socket close