netbs: Add more missing locks

This commit is contained in:
Łukasz Magiera
2022-11-08 09:37:43 +00:00
parent ec89424c42
commit 1513aab4c8
@@ -103,6 +103,9 @@ func (a *APIBlockstoreAccessor) RegisterApiStore(sid api.RemoteStoreID, st *lbst
a.remoteStores[sid] = st
st.OnClose(func() {
a.accessLk.Lock()
defer a.accessLk.Unlock()
if _, has := a.remoteStores[sid]; has {
delete(a.remoteStores, sid)
}