server/peer.c (p_txend): Rework the success path.
[tripe] / 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);
+    }
   }
 }