aboutsummaryrefslogtreecommitdiff
path: root/pkg/ipstack/ipstack.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/ipstack/ipstack.go')
-rw-r--r--pkg/ipstack/ipstack.go4
1 files changed, 3 insertions, 1 deletions
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()
}