From c5a2bef85274001ac947d34d6a205ca20d755923 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 6 Sep 2006 04:22:03 +0000 Subject: [PATCH] when the gateway is not bootstrapped.. it is useless, doing a short sleep, then going away git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@781 9efc2488-bf62-4759-914b-345cdb29e865 --- src/gateway/osrf_json_gateway.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gateway/osrf_json_gateway.c b/src/gateway/osrf_json_gateway.c index 3e15742..f370d0c 100644 --- a/src/gateway/osrf_json_gateway.c +++ b/src/gateway/osrf_json_gateway.c @@ -6,6 +6,7 @@ #include "objson/json2xml.h" #include #include +#include #define MODULE_NAME "osrf_json_gateway_module" @@ -88,7 +89,8 @@ static int osrf_json_gateway_method_handler (request_rec *r) { if( !bootstrapped || !osrf_system_get_transport_client()) { ap_log_rerror( APLOG_MARK, APLOG_ERR, 0, r, "Cannot process request " "because the OpenSRF JSON gateway has not been bootstrapped..."); - return HTTP_INTERNAL_SERVER_ERROR; + usleep( 100000 ); /* 100 milliseconds */ + exit(1); } osrfLogSetAppname("osrf_json_gw"); @@ -170,7 +172,7 @@ static int osrf_json_gateway_method_handler (request_rec *r) { osrfLogError(OSRF_LOG_MARK, "I am unable to communcate with opensrf..going away..."); /* we don't want to spawn an intense re-forking storm * if there is no jabber server.. so give it some time before we die */ - sleep(1); + usleep( 100000 ); /* 100 milliseconds */ exit(1); } -- 2.43.2