NetworkPkg: Fix the HttpCloseConnection fail issue

When HTTP server is unavailable,HttpCloseConnection will enter
infinite loop to wait for TCP4->close Event return, So we need to
decide the Http Instance state whether in the appropriate state
before close it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18400 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Zhang Lubo
2015-09-06 01:30:44 +00:00
committed by luobozhang
parent 0a4f7aa056
commit 374ecd0450
2 changed files with 15 additions and 11 deletions

View File

@@ -516,6 +516,7 @@ Error2:
HttpCloseTcp4ConnCloseEvent (HttpInstance);
if (NULL != Wrap->TcpWrap.TxToken.CompletionToken.Event) {
gBS->CloseEvent (Wrap->TcpWrap.TxToken.CompletionToken.Event);
Wrap->TcpWrap.TxToken.CompletionToken.Event = NULL;
}
Error1: