I would put a check in here:

    if(impl.complete) {
        return;
    }

This protects against `done()` being called twice, which is possible in some scenarios.