diff options
Diffstat (limited to 'NetworkPkg')
-rw-r--r-- | NetworkPkg/HttpDxe/HttpProto.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index 9457dd2623..cd54c57404 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -1086,6 +1086,18 @@ HttpConfigureTcp4 ( Tcp4Option->EnableNagle = TRUE;
Tcp4CfgData->ControlOption = Tcp4Option;
+ if ((HttpInstance->State == HTTP_STATE_TCP_CONNECTED) ||
+ (HttpInstance->State == HTTP_STATE_TCP_CLOSED))
+ {
+ Status = HttpInstance->Tcp4->Configure (HttpInstance->Tcp4, NULL);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "HttpConfigureTcp4(NULL) - %r\n", Status));
+ return Status;
+ }
+
+ HttpInstance->State = HTTP_STATE_TCP_UNCONFIGED;
+ }
+
Status = HttpInstance->Tcp4->Configure (HttpInstance->Tcp4, Tcp4CfgData);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "HttpConfigureTcp4 - %r\n", Status));
|