From b4878c1c20eea3e38145138e1c145f3bffe50ee8 Mon Sep 17 00:00:00 2001 From: Sebastian Hammer Date: Wed, 3 Jan 2007 16:59:32 +0000 Subject: [PATCH] Fixed bug that led to temporary busy-loops on write-select on some connections. Thanks to Adam for the patch. --- src/pazpar2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pazpar2.c b/src/pazpar2.c index fd5ebf5..1f91e6a 100644 --- a/src/pazpar2.c +++ b/src/pazpar2.c @@ -1,4 +1,4 @@ -/* $Id: pazpar2.c,v 1.7 2007-01-03 06:23:44 quinn Exp $ */; +/* $Id: pazpar2.c,v 1.8 2007-01-03 16:59:32 quinn Exp $ */; #include #include @@ -778,13 +778,16 @@ static int client_prep_connection(struct client *cl) if (co) { if (co->state == Conn_Connecting) + { cl->state = Client_Connecting; + iochan_setflag(co->iochan, EVENT_OUTPUT); + } else if (co->state == Conn_Open) { if (cl->state == Client_Error || cl->state == Client_Disconnected) cl->state = Client_Idle; + iochan_setflag(co->iochan, EVENT_OUTPUT); } - iochan_setflag(co->iochan, EVENT_OUTPUT); return 1; } else -- 1.7.10.4