mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-26 12:27:06 +00:00 
			
		
		
		
	Do not call nil handler for a dummy queue (#24880)
A dummy queue doesn't really have a handler (see line 211), so the `safeHandler` can safely drop all items
This commit is contained in:
		| @@ -239,7 +239,10 @@ func NewWorkerPoolQueueBySetting[T any](name string, queueSetting setting.QueueS | ||||
| 				log.Error("Recovered from panic in queue %q handler: %v\n%s", name, err, log.Stack(2)) | ||||
| 			} | ||||
| 		}() | ||||
| 		return w.origHandler(t...) | ||||
| 		if w.origHandler != nil { | ||||
| 			return w.origHandler(t...) | ||||
| 		} | ||||
| 		return nil | ||||
| 	} | ||||
|  | ||||
| 	return &w, nil | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 wxiaoguang
					wxiaoguang