public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "António Silva via groups.io" <apdars=gmail.com@groups.io>
To: devel@edk2.groups.io
Subject: [edk2-devel] HttpProtocol->request blocks execution
Date: Sat, 7 Jun 2025 10:20:52 -0300	[thread overview]
Message-ID: <CA+BjS3=r421MWrfjVo+GEcaGun5R6F2Ypr2+AaXGGtEduWhCug@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]

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]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 2022 bytes --]

             reply	other threads:[~2025-06-10  6:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-07 13:20 António Silva via groups.io [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-06-07 14:38 [edk2-devel] HttpProtocol->request blocks execution António Silva via groups.io

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+BjS3=r421MWrfjVo+GEcaGun5R6F2Ypr2+AaXGGtEduWhCug@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox