Fixed socket closing