  			}
  		}
  	}
-@@ -2096,5 +2128,16 @@
+@@ -2096,5 +2130,16 @@
  	char		*addr;
  {
  
-+	if (active_tx_asn >= 0 && (*(prot.prot->teardown))(active_tx_asn) == -1)
++	if ((*(prot.prot->teardown))(active_tx_asn) == -1)
 +		{
 +
 +		/* log the teardown error. */

 		lasttime = nextpkt_tv;
 
 		/* Did we exceed the limit on the number of packets to send? */
@@ -1382,6 +1410,10 @@
 						   pktlen,
 						   &(cur_tg->stop_before),
 						   &pktid);

 			{
 			/* (Re-)Start logging to a new file */
 			time_t now;
@@ -1144,6 +1161,10 @@
 
 			generate(tx_asn, cur_tg, lasttime);
 			}
