Skip to content

Commit

Permalink
Merge pull request #126 from sadeghpro/master
Browse files Browse the repository at this point in the history
Fix DoSafely func when use with params
  • Loading branch information
Streppel authored Nov 11, 2019
2 parents cad10e7 + 1921680 commit 5c21418
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gocron.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (j *Job) Do(jobFun interface{}, params ...interface{}) {

// DoSafely does the same thing as Do, but logs unexpected panics, instead of unwinding them up the chain
func (j *Job) DoSafely(jobFun interface{}, params ...interface{}) {
recoveryWrapperFunc := func() {
recoveryWrapperFunc := func(params ...interface{}) {
defer func() {
if r := recover(); r != nil {
log.Printf("Internal panic occurred: %s", r)
Expand Down

0 comments on commit 5c21418

Please sign in to comment.