From: erickson Date: Wed, 6 Sep 2006 04:22:03 +0000 (+0000) Subject: when the gateway is not bootstrapped.. it is useless, doing a short sleep, then going... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=deaacc1f67f9f0356ae3c9fa142cea3a239d324b;p=Evergreen.git when the gateway is not bootstrapped.. it is useless, doing a short sleep, then going away git-svn-id: svn://svn.open-ils.org/ILS/trunk@5974 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/OpenSRF/src/gateway/osrf_json_gateway.c b/OpenSRF/src/gateway/osrf_json_gateway.c index 3e157420aa..f370d0c467 100644 --- a/OpenSRF/src/gateway/osrf_json_gateway.c +++ b/OpenSRF/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); }