[pisa-src] r1160 - in trunk: pisacd/cdheartbeat.c pisasd/sdheartbeat.c

  • From: Thomas Jansen <mithi@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Thu, 15 Oct 2009 13:54:30 +0200

Author: tjansen
Date: Thu Oct 15 13:54:30 2009
New Revision: 1160

Log:
Changed the heartbeat timeouts in client and server.

The client tries to send a heartbeat after 15 seconds now (down from 20).
Considering the 2 second delay between the three heartbeat tries, we are at 19
seconds before a connection is considered to be broken.

The server waits 60 seconds for a data packet or a heartbeat before the
connection is disconnected internally.

Modified:
   trunk/pisacd/cdheartbeat.c
   trunk/pisasd/sdheartbeat.c

Modified: trunk/pisacd/cdheartbeat.c
==============================================================================
--- trunk/pisacd/cdheartbeat.c  Thu Oct 15 13:51:32 2009        (r1159)
+++ trunk/pisacd/cdheartbeat.c  Thu Oct 15 13:54:30 2009        (r1160)
@@ -87,7 +87,7 @@
        char buffer[INET6_ADDRSTRLEN]={0};
 
        inet_ntop(AF_INET6, &entry->hit, buffer, sizeof(buffer));
-       if (entry->timeout_heartbeat + 20 < *t) {
+       if (entry->timeout_heartbeat + 15 < *t) {
                pend = pisa_pending_add(entry, PISA_PKTTYPE_TUN_HEARTBEAT);
                pend->func = pisa_send_heartbeat_pend;
                pend->fail = pisa_send_heartbeat_fail;

Modified: trunk/pisasd/sdheartbeat.c
==============================================================================
--- trunk/pisasd/sdheartbeat.c  Thu Oct 15 13:51:32 2009        (r1159)
+++ trunk/pisasd/sdheartbeat.c  Thu Oct 15 13:54:30 2009        (r1160)
@@ -18,7 +18,7 @@
  * @sa removeTimedoutConnectionsFlag
  * @sa process
  */
-static time_t waitingPeriod=30;
+static time_t waitingPeriod = 60;
 
 /**
  * Check if a connection has timed out and remove it.

Other related posts:

  • » [pisa-src] r1160 - in trunk: pisacd/cdheartbeat.c pisasd/sdheartbeat.c - Thomas Jansen