Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/librumpclient Add another connection retry model which s...
details: https://anonhg.NetBSD.org/src/rev/431f85e85bae
branches: trunk
changeset: 761732:431f85e85bae
user: pooka <pooka%NetBSD.org@localhost>
date: Sun Feb 06 15:43:20 2011 +0000
description:
Add another connection retry model which simply does exit(1) if
the connection is severed.
(mostly for tests so that everything can be hooked to rump_server's exit)
diffstat:
lib/librumpclient/rumpclient.c | 6 ++++--
lib/librumpclient/rumpclient.h | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diffs (44 lines):
diff -r 53307548e28e -r 431f85e85bae lib/librumpclient/rumpclient.c
--- a/lib/librumpclient/rumpclient.c Sun Feb 06 15:41:37 2011 +0000
+++ b/lib/librumpclient/rumpclient.c Sun Feb 06 15:43:20 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpclient.c,v 1.23 2011/02/06 15:41:37 pooka Exp $ */
+/* $NetBSD: rumpclient.c,v 1.24 2011/02/06 15:43:20 pooka Exp $ */
/*
* Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved.
@@ -101,6 +101,8 @@
/* no persistent connections */
if (retrytimo == 0)
break;
+ if (retrytimo == RUMPCLIENT_RETRYCONN_DIE)
+ exit(1);
if (!prevreconmsg) {
prevreconmsg = time(NULL);
@@ -805,7 +807,7 @@
rumpclient_setconnretry(time_t timeout)
{
- if (timeout < RUMPCLIENT_RETRYCONN_ONCE)
+ if (timeout < RUMPCLIENT_RETRYCONN_DIE)
return; /* gigo */
retrytimo = timeout;
diff -r 53307548e28e -r 431f85e85bae lib/librumpclient/rumpclient.h
--- a/lib/librumpclient/rumpclient.h Sun Feb 06 15:41:37 2011 +0000
+++ b/lib/librumpclient/rumpclient.h Sun Feb 06 15:43:20 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpclient.h,v 1.3 2011/01/27 18:04:05 pooka Exp $ */
+/* $NetBSD: rumpclient.h,v 1.4 2011/02/06 15:43:20 pooka Exp $ */
/*-
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@@ -39,6 +39,7 @@
#define RUMPCLIENT_RETRYCONN_INFTIME ((time_t)-1)
#define RUMPCLIENT_RETRYCONN_ONCE ((time_t)-2)
+#define RUMPCLIENT_RETRYCONN_DIE ((time_t)-3)
void rumpclient_setconnretry(time_t);
__END_DECLS
Home |
Main Index |
Thread Index |
Old Index