Skip to content

HttpClient - Not able to make a request over WiFi when ethernet conencted #4341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
maganuk opened this issue Sep 15, 2020 · 3 comments
Closed
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@maganuk
Copy link

maganuk commented Sep 15, 2020

Hardware:

Board: ESP32-Ethernet-Kit
Core Installation version: 1.0.3
IDE name: Platform.io
Flash Frequency: 40Mhz
PSRAM enabled: yes
Upload Speed: 115200
Computer OS: Windows 10

Description:

Make a request using the HTTPClient when both WiFi and Ethernet are connected. If both are connected, the HTTPClient will always make the request over Ethernet. How can I change this priority?

Sketch:

HTTPClient httpClient;
if (isEthernet)
{
  WiFiClient wifiClient;
  httpClient.begin(wifiClient, serverCheckUrl);
}
else
{
  httpClient.begin(serverCheckUrl);
}
@Jeroen88
Copy link
Contributor

As you can see here you can only pass in a WiFiClient and not an ethernet client. So it will not work.

Maybe you can use my PR #3848.

@stale
Copy link

stale bot commented Nov 15, 2020

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Nov 15, 2020
@stale
Copy link

stale bot commented Nov 30, 2020

[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

2 participants