netbs: Add more missing locks
This commit is contained in:
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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user