gateway: add missing unlock in bridge forwarder by jedevc · Pull Request #6355 · moby/buildkit (original) (raw)

Should we move this section into another function so we can use defer lbf.mu.Unlock() instead? This seems like it's too easy to forget to unlock. It might be worth taking this entire section from the lock to the unlock and putting it into a helper function.

I think I'd prefer that over an anonymous function just for ease of reading but an anonymous function would also work.