Fix deadlock on checking pending notification
This commit is contained in:
parent
89370b7d7f
commit
b559c561d8
|
@ -303,7 +303,14 @@ func (db sqlitePersistence) HasPendingNotificationsForChat(chatID string) (bool,
|
|||
return false, err
|
||||
}
|
||||
|
||||
return rows.Next(), nil
|
||||
result := false
|
||||
|
||||
if rows.Next() {
|
||||
result = true
|
||||
rows.Close()
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (db sqlitePersistence) GetActivityCenterNotificationsByID(ids []types.HexBytes) ([]*ActivityCenterNotification, error) {
|
||||
|
|
Loading…
Reference in New Issue