server/peer.c (p_txend): Rework the success path.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 20 Sep 2021 23:21:50 +0000 (00:21 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 30 Apr 2022 00:51:38 +0000 (01:51 +0100)
Now it's less confusing to add other kinds of success actions here.  Not
that I wiol on-haven try to do this in an alternate future or anything.

server/peer.c

index bc90b32..0b5a6c2 100644 (file)
@@ -565,9 +565,11 @@ static int p_dotxend(peer *p)
 
 void p_txend(peer *p, unsigned f)
 {
-  if (p_dotxend(p) && p->spec.t_ka) {
-    sel_rmtimer(&p->tka);
-    p_setkatimer(p);
+  if (p_dotxend(p)) {
+    if (p->spec.t_ka) {
+      sel_rmtimer(&p->tka);
+      p_setkatimer(p);
+    }
   }
 }