diff --git a/utils/utils.go b/utils/utils.go index 50a1217..d4bbef2 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -128,10 +128,10 @@ func UDPStoppableRoutine(stopCh <-chan struct{}, name string, decodeFunc decoder if sockReuse { pconn, err := reuseport.ListenPacket("udp", addrUDP.String()) - defer pconn.Close() if err != nil { return err } + defer pconn.Close() var ok bool udpconn, ok = pconn.(*net.UDPConn) if !ok {