Skip to content

Commit

Permalink
Use latch
Browse files Browse the repository at this point in the history
  • Loading branch information
rxdn committed Nov 16, 2024
1 parent 737eecf commit 0cfab8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/http/purgeguild.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (s *Server) purgeGuildHandler(ctx *gin.Context) {
}
}

close(removeCh)
latch.Done()
}()

// Fetch from the database
Expand All @@ -161,6 +161,8 @@ func (s *Server) purgeGuildHandler(ctx *gin.Context) {
Key: obj.S3Key(),
}
}

latch.Done()
}()

// Close the remove channel when both goroutines have completed
Expand Down

0 comments on commit 0cfab8e

Please sign in to comment.