ensure shutdown is invoked from ~EndpointBase