# HG changeset patch # User teknolog # Date 1272896595 -3600 # Node ID 46e6a623d36d0806dd7b48d14440cb5d8869ccb2 # Parent ba4dba32295b714b96523accbf273b7276a1464b Fix to make sure file handle is closed on failed download. diff -r ba4dba32295b -r 46e6a623d36d engine/src/HttpEventHandler.cpp --- a/engine/src/HttpEventHandler.cpp Sun May 02 13:14:23 2010 +0100 +++ b/engine/src/HttpEventHandler.cpp Mon May 03 15:23:15 2010 +0100 @@ -193,12 +193,14 @@ case THTTPEvent::ESucceeded: { DP("Transaction Successful"); + iRespBodyFile.Close(); aTransaction.Close(); iHttpClient->ClientRequestCompleteL(KErrNone); } break; case THTTPEvent::EFailed: { DP("Transaction Failed"); + iRespBodyFile.Close(); aTransaction.Close(); if(iLastStatusCode == HTTPStatus::EOk || iLastStatusCode == HTTPStatus::ECreated || iLastStatusCode == HTTPStatus::EAccepted) @@ -222,6 +224,7 @@ // close off the transaction if it's an error if (aEvent.iStatus < 0) { + iRespBodyFile.Close(); aTransaction.Close(); iHttpClient->ClientRequestCompleteL(aEvent.iStatus); }