mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
fix: recover when goroutine panic that will kill main program (#692)
* fix #684 recover when goroutine panic that will kill main program * Update util.go Co-authored-by: Yang Luo <hsluoyz@qq.com>
This commit is contained in:
@ -65,5 +65,5 @@ func RecordMessage(ctx *context.Context) {
|
||||
record.Organization, record.User = util.GetOwnerAndNameFromId(userId)
|
||||
}
|
||||
|
||||
go object.AddRecord(record)
|
||||
util.SafeGoroutine(func() {object.AddRecord(record)})
|
||||
}
|
||||
|
Reference in New Issue
Block a user