Skip to content

Commit

Permalink
fix(response): revert #6
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Sep 4, 2024
1 parent 8c602be commit 1317e11
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions response.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package control
import (
"errors"
"strconv"

sql "github.com/FloatTech/sqlite"
)

// InitResponse ...
Expand Down Expand Up @@ -52,7 +50,6 @@ func (manager *Manager[CTX]) CanResponse(gid int64) bool {
if ok {
return ext != "-"
}

var rsp ResponseGroup
manager.RLock()
err := manager.D.Find("__resp", &rsp, "where gid = 0") // all status
Expand All @@ -66,7 +63,7 @@ func (manager *Manager[CTX]) CanResponse(gid int64) bool {
manager.RLock()
err = manager.D.Find("__resp", &rsp, "where gid = "+strconv.FormatInt(gid, 10))
manager.RUnlock()
if err != nil && !errors.Is(err, sql.ErrNullResult) {
if err != nil {
manager.Lock()
respCache[gid] = "-"
manager.Unlock()
Expand Down

0 comments on commit 1317e11

Please sign in to comment.