0

I want to preface this by saying that I don't really have a problem I need fixing. More like I have a small problem that is fixed by minor things, but I am just curious how this kind of problem can occur at all. I hope this is the right stack for this question! Also feel free to speculate wildly, as I don't think it is possible to definitely determine the correct answer, but any answer might be educational!

So in more detail: The concrete program I have an issue with is the Spotify program on my computer. I have this room where the Wifi is really bad, so I connect my computer to LAN using an Ethernet cable. But the Wifi is still reachable, just very bad. Every program on my computer (Firefox, Mail, Telegram, some other messengers...) have no problem using the LAN (I presume, because they work). Only the Spotify program has very bad internet, has timeouts, is telling me it has not internet connection... Like it is connected to the Wifi instead of to the LAN connection. So my assumption is: every program on my computer manages to use the good LAN connection instead of the bad Wifi connection.

I said before that I don't need help fixing this problem: disabling Wifi and then restarting Spotify works for me. However, in researching this problem I found that the Spotify program seems to have a general problem with being more stable with Wifi than with LAN. See for example this Spotify community thread where people have been having this issue for years. So I think I am not imagining things but this is a general problem specific to the Spotify program.

And here comes my actual question: How can this be? Why doesn't the OS manage which internet connection every program uses? I would have assumed that most programs using the internet do not interact that much (or at all) with the networking side of things. Also in which way are LAN and Wifi connections different that a LAN connection can be less stable, like stated in the community thread.

Thank you in advance for answers! :)

2
  • Can you verify your assumptions? Install Wireshark and check what's happening on the WiFi interface while Ethernet is connected. Commented May 22, 2023 at 14:04
  • Hi, no idea where your assumption is coming from. Apps can use any connection interface that they desire, it'd be extremely weird if the system told them what to do. There are of course some defaults which programming libraries implement, but your way would make certain applications impossible.
    – Destroy666
    Commented May 22, 2023 at 14:40

2 Answers 2

2

One way that what you're describing could happen is if Spotify keeps a TCP connection (or UDP socket) open on the IP address your machine got on the Wi-Fi. Because it's associated with an IP address that's only in the Wi-Fi, the OS can't just automatically switch it over to the Ethernet interface's IP address because that would break the connection or flow.

Most apps don't keep long-lived sessions open nowadays; most just do HTTP requests when they need more data. So as soon as the Ethernet interface comes up, any new HTTP requests go over Ethernet.

I've never looked at Spotify traffic in a packet analyzer (sniffer), so I can't say for sure that this is what's happening, but it would explain the behavior you're seeing.

1

Windows doesn't manage the internet connection of a program. The program rather issues an API request in which it specifies the kind of connection that it requests.

Nothing prevents a program like Spotify from issuing a request for a WiFi connection, and only if this doesn't work issue a second request asking for a LAN connection.

I'm not stating that this is exactly what Spotify does, but from all accounts its connection code is programmed in a pretty poor way.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .