Skip to content
This repository has been archived by the owner on Nov 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #24 from UnownHash/comstud/reload-acct-fix
Browse files Browse the repository at this point in the history
Fix ReloadAccounts if accounts are removed
  • Loading branch information
Fabio1988 authored Oct 14, 2023
2 parents ebc041a + 0c25760 commit f120afc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 5 additions & 2 deletions accounts/accountManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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--
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions koji/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f120afc

Please sign in to comment.