diff options
author | Zhang Lubo <lubo.zhang@intel.com> | 2015-12-18 01:52:17 +0000 |
---|---|---|
committer | luobozhang <luobozhang@Edk2> | 2015-12-18 01:52:17 +0000 |
commit | 621a618a8c2c12f59c4982340b5cdd9d95d45518 (patch) | |
tree | eb27e7b7d8e43afd3dd5c6069df475f79a5a2e4b | |
parent | a00bd8e0e652fe8bbab8a9422fbc25d83552e9f8 (diff) | |
download | edk2-platforms-621a618a8c2c12f59c4982340b5cdd9d95d45518.tar.xz |
NetworkPkg:Fix the issue Http boot hang when network failed.
For both IPv4 and IPv6, when network transfer failed, such as disconnected
cable or disable http server, HTTP boot should exit back to the menu UI
rather than hang.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@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@19335 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | NetworkPkg/HttpDxe/HttpProto.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index 85f8401540..165e95cc50 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -150,6 +150,9 @@ HttpTcpReceiveNotifyDpc ( gBS->CloseEvent (Wrap->TcpWrap.Rx6Token.CompletionToken.Event);
if (EFI_ERROR (Wrap->TcpWrap.Rx6Token.CompletionToken.Status)) {
+ Wrap->HttpToken->Status = Wrap->TcpWrap.Rx6Token.CompletionToken.Status;
+ gBS->SignalEvent (Wrap->HttpToken->Event);
+ FreePool (Wrap);
return ;
}
@@ -157,6 +160,9 @@ HttpTcpReceiveNotifyDpc ( gBS->CloseEvent (Wrap->TcpWrap.Rx4Token.CompletionToken.Event);
if (EFI_ERROR (Wrap->TcpWrap.Rx4Token.CompletionToken.Status)) {
+ Wrap->HttpToken->Status = Wrap->TcpWrap.Rx4Token.CompletionToken.Status;
+ gBS->SignalEvent (Wrap->HttpToken->Event);
+ FreePool (Wrap);
return ;
}
}
|