From 621a618a8c2c12f59c4982340b5cdd9d95d45518 Mon Sep 17 00:00:00 2001 From: Zhang Lubo Date: Fri, 18 Dec 2015 01:52:17 +0000 Subject: 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 Reviewed-by: Ye Ting Reviewed-by: Wu Jiaxin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19335 6f19259b-4bc3-4df7-8a09-765794883524 --- NetworkPkg/HttpDxe/HttpProto.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'NetworkPkg/HttpDxe') 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 ; } } -- cgit v1.2.3