Don't assume that endpoint close may return a deferred. Just call it directly.