fix: not call RUnlock
This commit is contained in:
parent
2922959f0b
commit
6ec413b7ad
@ -35,6 +35,7 @@ func (mp *MessagePool) CheckPendingMessages(ctx context.Context, from address.Ad
|
||||
mp.lk.RLock()
|
||||
mset, ok, err := mp.getPendingMset(ctx, from)
|
||||
if err != nil {
|
||||
mp.lk.RUnlock()
|
||||
return nil, xerrors.Errorf("errored while getting pending mset: %w", err)
|
||||
}
|
||||
if ok {
|
||||
@ -70,6 +71,7 @@ func (mp *MessagePool) CheckReplaceMessages(ctx context.Context, replace []*type
|
||||
msgMap[m.From] = mmap
|
||||
mset, ok, err := mp.getPendingMset(ctx, m.From)
|
||||
if err != nil {
|
||||
mp.lk.RUnlock()
|
||||
return nil, xerrors.Errorf("errored while getting pending mset: %w", err)
|
||||
}
|
||||
if ok {
|
||||
@ -153,6 +155,7 @@ func (mp *MessagePool) checkMessages(ctx context.Context, msgs []*types.Message,
|
||||
mp.lk.RLock()
|
||||
mset, ok, err := mp.getPendingMset(ctx, m.From)
|
||||
if err != nil {
|
||||
mp.lk.RUnlock()
|
||||
return nil, xerrors.Errorf("errored while getting pending mset: %w", err)
|
||||
}
|
||||
if ok && !interned {
|
||||
|
Loading…
Reference in New Issue
Block a user