Flushing queues on exit is sort of a partial solution, but this could be
better. Really what we want is for no more packets to be enqueued after
isUp is set to false.
A premature waitgroup .Done resulted in reading from closed channel.
This caused a nil-pointer deref & crash.
Added additional debugging when closing routines.