When the the context is cancel we need to return from the go-routine after de-registering the service.