serialize client auth (#232) (#1198)

This commit is contained in:
Steve Joachim
2021-07-15 14:27:13 -04:00
committed by GitHub
parent 7cabed85ae
commit 83b4dee349

View File

@@ -200,7 +200,11 @@ func (mcs *MultiClientSnapshotter) createOrGetSnapshotter(ctx context.Context) (
}
// Register client with server and create connection
if err := mcs.server.AuthorizeClient(c.ID); err != nil {
mcs.mu.Lock()
err = mcs.server.AuthorizeClient(c.ID)
mcs.mu.Unlock()
if err != nil {
return nil, err
}