Skip to content

Commit

Permalink
fix: persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
gwleclerc committed Jan 22, 2024
1 parent 3204711 commit 4d0afd8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/services/persistence.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ func (p *persistence) StoreSessions(sessions types.Sessions) {
return
}
var sessionsGroup errgroup.Group
for _, ses := range sessions {
session := *ses
for i := range sessions {
session := sessions[i]
sessionsGroup.Go(func() error {
if err := p.createSessionDirectory(session.ID); err != nil {
return err
Expand Down Expand Up @@ -161,8 +161,8 @@ func (p *persistence) LoadSessions() (types.Sessions, error) {
}
var sessionsGroup errgroup.Group
var sessionsLock sync.Mutex
for _, ses := range sessions {
session := *ses
for i := range sessions {
session := sessions[i]
sessionsGroup.Go(func() error {
historyFile, err := os.Open(filepath.Join(p.persistenceDirectory, session.ID, historyFileName))
if err != nil {
Expand Down

0 comments on commit 4d0afd8

Please sign in to comment.