From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 8514E740039 for ; Tue, 10 Jun 2025 06:12:16 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=eyPJZWUMQoCoi7wJ/p9CeO22rvJCl5k4dB6TL/CxXto=; c=relaxed/simple; d=groups.io; h=MIME-Version:From:Date:Message-ID:Subject:To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240830; t=1749535936; v=1; x=1749795134; b=hdaXRB2YQmaYNYqUKETP+z+3cF0lDnKCJsm1LiUxqZMYXXl2kfHHpCVuw2z+ZfQTpk1pKBF5 CzqxFNKH4kedNCbACt+bJ0IjjZW9du7HkZUxJ4SvdtAqxQgVQBwbd7jE1e9Jq19nSVplaeVfSRL QbQOCwa6wY7pKrmX8E4txB9FvPIXyGzXGKVIj9bIzld/kHVsuBwwcigyl6F9E8opbK5KNsYHV90 wSafWOZ47/vO0m+xAS+dtkmQfkiAOkhtW7WNEw82GiWyPUrWuA1OfvIXpyYUzXwm3p0Ux/2jAvG rRPp7yBTEXgOOCpq2Z3r1Kxs+yd7BeJQAHxl/OO2PG4VA== X-Received: by 127.0.0.2 with SMTP id sze3YY7687511xVYe7ZZA9JB; Mon, 09 Jun 2025 23:12:14 -0700 X-Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by mx.groups.io with SMTP id smtpd.web10.18296.1749302466808674363 for ; Sat, 07 Jun 2025 06:21:07 -0700 X-Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-32ade3723adso19394651fa.0 for ; Sat, 07 Jun 2025 06:21:06 -0700 (PDT) X-Gm-Message-State: UIhY4bvcxhTZ3co5N5zuVUKCx7686176AA= X-Gm-Gg: ASbGnctle5LPljd7m2z2qjYluKY+2slbKSUx86Cjih3xe+1PkBmpHdweEp6cQtVPU5W 2jztWbVtGzly7xzF+S+JZtgC6cGt2cBOnKGum3uI6C69RYfQEtPSLhfWnl+iSWnAsLU9yios7Aa VtyEKwdTMpi5ybiIVbZ6ydkGtm3iWmaxcOTuWeiyzBIQp4RkVt03EcbbDKF9n7rTIipw== X-Google-Smtp-Source: AGHT+IEcMwYnJv8qMDBysDNucDGSnqgnvGmrVQFMYVmjNQh1Xew5kb8ejpoSpf3AHBln9gQZDpkoZxabMROBfT6b/y8= X-Received: by 2002:a2e:8704:0:b0:32a:8ae2:a8c8 with SMTP id 38308e7fff4ca-32adfc5000cmr15654471fa.2.1749302464642; Sat, 07 Jun 2025 06:21:04 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?B?QW50w7NuaW8gU2lsdmEgdmlhIGdyb3Vwcy5pbw==?= Date: Sat, 7 Jun 2025 10:20:52 -0300 X-Gm-Features: AX0GCFuoXZcqBm0ISKd1yFHrt--sfrSmgKIfgRYy3wnHDhW7Mgdz1GXaRczQ9sk Message-ID: Subject: [edk2-devel] HttpProtocol->request blocks execution To: devel@edk2.groups.io Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Mon, 09 Jun 2025 23:12:13 -0700 Resent-From: apdars@gmail.com Reply-To: devel@edk2.groups.io,apdars@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: multipart/alternative; boundary="0000000000000284c60636fb38b2" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=hdaXRB2Y; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io --0000000000000284c60636fb38b2 Content-Type: text/plain; charset="UTF-8" After configuring the HTTP Protocol, creating the event for the callback and filling all the necessary fields on the request token, I'm using : *.... Status = HttpProtocol->Request(HttpProtocol, &RequestToken);* * Print(L"Only gets printed after Request is successful");* *....* To start the HTTP request. This code is being compiled as a UEFI Application and run via UEFI SHELL using the QEMU emulator. The http request works as expected when the host is responsive, however, when the host is unreachable (for example offline), the execution just hangs for more than 2 minutes, eventually returning with a Status code of EFI_TIME_OUT. I have tried reducing the timeout interval by defining *....ConfigData->TimeOutMillisec = 5000;* *Status = HttpProtocol->Configure(HttpProtocol, ConfigData);....* But this doesn't seem to change the behaviour of the request function. Why is HttpProtocol->request blocking execution and not following the event pattern, and how could I customize the timeout interval? Any feedback much appreciated, thank you! -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#121408): https://edk2.groups.io/g/devel/message/121408 Mute This Topic: https://groups.io/mt/113565399/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- --0000000000000284c60636fb38b2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
After configuring the HTTP Protocol, creating the event fo= r the callback and filling all the necessary fields on the request token, I= 'm using :

....
=C2=A0Status =3D HttpProtocol->Request(= HttpProtocol, &RequestToken);
=C2=A0Print(L"Only gets p= rinted after Request is successful");
....

T= o start the HTTP request. This code is being compiled as a UEFI Application= and run via UEFI SHELL using the QEMU emulator.

The http request wo= rks as expected when the host is responsive, however, when the host is unre= achable (for example offline), the execution just hangs for more than 2 min= utes, eventually returning with a Status code of EFI_TIME_OUT.=C2=A0
I have tried reducing the timeout interval by defining
....
Confi= gData->TimeOutMillisec =C2=A0 =C2=A0=3D 5000;
Status = =3D HttpProtocol->Configure(HttpProtocol, ConfigData);
....
=

But this doesn't seem to change the behaviour of the req= uest function.=C2=A0

Why is HttpProtocol->request blocking execut= ion and not following the event pattern, and how could I customize the time= out interval?

Any feedback much appreciated, thank you!
_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#121408) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--0000000000000284c60636fb38b2--