chiark
/
gitweb
/
~ian
/
inn-innduct.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3fca16a
)
do not block reconnections due to us having successfully connected our only connection
author
Ian Jackson
<ian@liberator.(none)>
Wed, 5 May 2010 20:35:57 +0000
(21:35 +0100)
committer
Ian Jackson
<ian@liberator.(none)>
Wed, 5 May 2010 20:35:57 +0000
(21:35 +0100)
backends/innduct.c
patch
|
blob
|
history
diff --git
a/backends/innduct.c
b/backends/innduct.c
index 772fc89c0079e99be2146d40a53fd7e65bcf344c..adf6cad9573b4b925b79c2dacd8a46278f5500ec 100644
(file)
--- a/
backends/innduct.c
+++ b/
backends/innduct.c
@@
-1233,7
+1233,6
@@
static pid_t connecting_child;
static int connecting_fdpass_sock;
static void connect_attempt_discard(void) {
static int connecting_fdpass_sock;
static void connect_attempt_discard(void) {
- reconnect_blocking_event();
if (connecting_child) {
int status= xwaitpid(&connecting_child, "connect");
if (!(WIFEXITED(status) ||
if (connecting_child) {
int status= xwaitpid(&connecting_child, "connect");
if (!(WIFEXITED(status) ||
@@
-1358,6
+1357,7
@@
static void *connchild_event(oop_source *lp, int fd, oop_event e, void *u) {
x:
conn_dispose(conn);
connect_attempt_discard();
x:
conn_dispose(conn);
connect_attempt_discard();
+ reconnect_blocking_event();
return OOP_CONTINUE;
}
return OOP_CONTINUE;
}
@@
-1372,6
+1372,7
@@
static void connect_start(void) {
assert(!connecting_fdpass_sock);
info("starting connection attempt");
assert(!connecting_fdpass_sock);
info("starting connection attempt");
+ int ok_reconnect_delay_periods= reconnect_delay_periods;
reconnect_blocking_event();
int socks[2];
reconnect_blocking_event();
int socks[2];
@@
-1465,6
+1466,9
@@
static void connect_start(void) {
connecting_fdpass_sock= socks[0];
xsetnonblock(connecting_fdpass_sock, 1);
on_fd_read_except(connecting_fdpass_sock, connchild_event);
connecting_fdpass_sock= socks[0];
xsetnonblock(connecting_fdpass_sock, 1);
on_fd_read_except(connecting_fdpass_sock, connchild_event);
+
+ if (!conns.count)
+ reconnect_delay_periods= ok_reconnect_delay_periods;
}
/*---------- assigning articles to conns, and transmitting ----------*/
}
/*---------- assigning articles to conns, and transmitting ----------*/