Skip to content

Commit

Permalink
Add aborting during a command
Browse files Browse the repository at this point in the history
  • Loading branch information
alufers committed Sep 29, 2019
1 parent 9886ade commit de701bc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/printer_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ func (pm *PrinterService) handleJob(job *PrintJobInternal) {
log.Printf("Resending line %v", num)
<-pm.okSem
sendAndMaybeResend(job.getLineForResend(num))
case <-pm.abortPrintSem:
job.abort()
return
}
}
for line := range lineChan {
Expand Down

0 comments on commit de701bc

Please sign in to comment.