From: Sebastian Hammer Date: Wed, 3 Jan 2007 16:59:32 +0000 (+0000) Subject: Fixed bug that led to temporary busy-loops on write-select on some connections. X-Git-Tag: before.append.child~53 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=b4878c1c20eea3e38145138e1c145f3bffe50ee8;p=pazpar2-moved-to-github.git Fixed bug that led to temporary busy-loops on write-select on some connections. Thanks to Adam for the patch. --- 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