diff --git a/accounts/accountManager.go b/accounts/accountManager.go index de0b700..3c5760f 100644 --- a/accounts/accountManager.go +++ b/accounts/accountManager.go @@ -5,10 +5,11 @@ import ( "flygon/config" "flygon/db" "flygon/pogo" - log "github.com/sirupsen/logrus" - "gopkg.in/guregu/null.v4" "sync" "time" + + log "github.com/sirupsen/logrus" + "gopkg.in/guregu/null.v4" ) type AccountDetails struct { @@ -86,6 +87,8 @@ func (a *AccountManager) ReloadAccounts() { a.accounts = append(a.accounts[:x], a.accounts[x+1:]...) a.inUse = append(a.inUse[:x], a.inUse[x+1:]...) foundRecords = append(foundRecords[:x], foundRecords[x+1:]...) + // 'x' now points to next record, so we need to repeat + x-- } } } diff --git a/koji/main.go b/koji/main.go index f4adf6b..5ad621e 100644 --- a/koji/main.go +++ b/koji/main.go @@ -92,10 +92,6 @@ func LoadKojiAreas(details *db.DbDetails) { return } - if err != nil { - log.Errorf("[KOJI]: %s", err) - return - } var backgroundProcesses sync.WaitGroup parallelSem := make(chan bool, 50)