From f81bfd8b8e1c663d40bcc0f2ce9fb114a204f8d7 Mon Sep 17 00:00:00 2001 From: sotech117 Date: Mon, 9 Oct 2023 12:54:59 -0400 Subject: small changes --- pkg/ipstack/ipstack.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkg/ipstack/ipstack.go') diff --git a/pkg/ipstack/ipstack.go b/pkg/ipstack/ipstack.go index c993a7d..446bbff 100644 --- a/pkg/ipstack/ipstack.go +++ b/pkg/ipstack/ipstack.go @@ -373,7 +373,9 @@ func CleanUp() { fmt.Print("Cleaning up...\n") // go through the interfaces, pop thread & close the UDP FDs for _, iface := range myInterfaces { - close(iface.SocketChannel) + if iface.SocketChannel != nil { + close(iface.SocketChannel) + } iface.RecvSocket.Close() } -- cgit v1.2.3-70-g09d2