[Sumover-dev] [svn commit] r4072 - common/trunk/src

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Tue Jun 19 15:08:02 BST 2007


Author: piers
Date: Tue Jun 19 15:08:01 2007
New Revision: 4072

Modified:
   common/trunk/src/mbus.c

Log:
Increase the number of retransmits that will occur - as before only 3 retransmissions were made but it waited up to 10secs - now it waits for up to 5secs but retransmits every 500millisec. Hopefully should handle extended app freezing Windows when something
holds the system up (which seems to happen quite a bit - just try starting a large app or two...)


Modified: common/trunk/src/mbus.c
==============================================================================
--- common/trunk/src/mbus.c	(original)
+++ common/trunk/src/mbus.c	Tue Jun 19 15:08:01 2007
@@ -393,7 +393,7 @@
 
 	/* diff is time in milliseconds that the message has been awaiting an ACK */
 	diff = ((time.tv_sec * 1000) + (time.tv_usec / 1000)) - ((curr->send_time.tv_sec * 1000) + (curr->send_time.tv_usec / 1000));
-	if (diff > 10000) {
+	if (diff > 5000) {
 		debug_msg("Reliable mbus message failed!\n");
 		if (m->err_handler == NULL) {
 			abort();
@@ -414,13 +414,13 @@
 	/* Note: We only send one retransmission each time, to avoid
 	 * overflowing the receiver with a burst of requests...
 	 */
-	if ((diff > 750) && (curr->retransmit_count == 2)) {
-		debug_msg("Reliable mbus message resending after 750ms\n");
+	if ((diff > 500*(curr->retransmit_count)) ) {
+		debug_msg("Reliable mbus message resending after %dms\n", 500*curr->retransmit_count);
 		resend(m, curr);
 		return;
-	} 
-	if ((diff > 500) && (curr->retransmit_count == 1)) {
-		debug_msg("Reliable mbus message resending after 500ms\n");
+	}
+	if ((diff > 750) && (curr->retransmit_count == 2)) {
+		debug_msg("Reliable mbus message resending after 750ms\n");
 		resend(m, curr);
 		return;
 	} 



More information about the Sumover-dev mailing list