diff options
author | sotech117 <michael_foiani@brown.edu> | 2023-10-09 12:54:59 -0400 |
---|---|---|
committer | sotech117 <michael_foiani@brown.edu> | 2023-10-09 12:54:59 -0400 |
commit | f81bfd8b8e1c663d40bcc0f2ce9fb114a204f8d7 (patch) | |
tree | 17d4b3922eeedfdde09c180dd24b5cca84ab6882 /pkg/ipstack/ipstack.go | |
parent | 365548a29f23f15632305d65070236cfd270589c (diff) |
small changes
Diffstat (limited to 'pkg/ipstack/ipstack.go')
-rw-r--r-- | pkg/ipstack/ipstack.go | 4 |
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() } |