netbs: Add more missing locks

This commit is contained in:
Łukasz Magiera 2022-11-04 16:59:38 +00:00
parent ec89424c42
commit 1513aab4c8

View File

@ -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)
}