Skip to content

Commit

Permalink
fix slice deletion / deadlock
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
emidoots committed Dec 29, 2022
1 parent 3faa949 commit 5f0efe1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/wrench/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (b *Bot) runnerStart() error {
select {
case _, ok := <-running.Done:
if !ok {
runningJobs = slices.Delete(runningJobs, i, i)
runningJobs = slices.Delete(runningJobs, i, i+1)
goto sliceUpdated
}
default:
Expand Down
2 changes: 1 addition & 1 deletion service_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Examples:
case line, ok := <-tail.Lines:
lastLine = time.Now()
if !ok {
tails = slices.Delete(tails, i, i)
tails = slices.Delete(tails, i, i+1)
goto sliceUpdated
}
if !*showAllFlag {
Expand Down

0 comments on commit 5f0efe1

Please sign in to comment.