Fix nil check for nil value interfaces
This commit is contained in:
@@ -216,6 +216,10 @@ func (q *Queue) packetHandler(ctx context.Context) func(nfqueue.Attribute) int {
|
|||||||
|
|
||||||
// Destroy destroys the queue. Any error encountered is logged.
|
// Destroy destroys the queue. Any error encountered is logged.
|
||||||
func (q *Queue) Destroy() {
|
func (q *Queue) Destroy() {
|
||||||
|
if q == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
q.cancelSocketCallback()
|
q.cancelSocketCallback()
|
||||||
|
|
||||||
if nf := q.getNfq(); nf != nil {
|
if nf := q.getNfq(); nf != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user