Reset asyncRunning earlier to prevent ghttp_process calls and cover both paths

This commit is contained in:
Douglas Clowes
2013-07-31 11:44:49 +10:00
parent 39723685f5
commit 69925baaf6

View File

@@ -413,13 +413,13 @@ static int AnstoHttpStatus_Base(pHistDriver self,SConnection *pCon,int *pextrast
switch(httpStatus){
case ghttp_error:
ghttp_close(pPriv->syncRequest);
pPriv->asyncRunning = 0; // MJL bug fix 9/03/07 moved by DFC
anstoHttpGetPrepare(pPriv,statusdaq);
ghttp_prepare(pPriv->syncRequest);
httpStatus = ghttp_process(pPriv->syncRequest);
if(httpStatus != ghttp_done){
strncpy(pPriv->hmError,"Reconnect", 511);
pPriv->errorCode = SERVERERROR;
pPriv->asyncRunning = 0; // MJL bug fix 9/03/07
if (pextrastatus) *pextrastatus=ANSTO_HS_STATUS_INVALID;
return HWFault;
}