We do this after sending the keepalive anyway.
This is something of a regression, though, since before we'd cancel and
then send, but now we send and then cancel, so it introduces a potential
race, but hopefully that isn't too big of a deal.
Kernel module commit a24b3e6e15ae1ea1291666e5da910caf43eedbaf
We reorganize this into also doing so on sending keepalives itself,
which means the state machine is much more consistent, even if this was
already implied.
Kernel module commit 30290ef1d2581a3e6ee8ffcdb05d580cfba976be
1. Removed remaining signals from peer struct
2. Made needAnotherKeepalive local
3. Removed environment check from warning text (annoying when debugging)
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.