Zur Info: es scheint kein Problem von httpGet zu sein, wie ich zunächst vermutete, sondern ein Problem der node-sonos-http-api in Verbindung mit Node.js 20. Der Entwickler schrieb mir dazu auf GitHub:
I think this is related to this global change in Node 20:
nodejs/node#43522
The Sonos players probably doesn't like keep-alive, and might not properly respond with a Connection: close. The http api will maintain connections and try to send new requests over the old socket and probably confusing the player.
Since this only affects requests that happen within 30-90 seconds (not sure what the default timeout is), this might appear random.
I'll see if I can reproduce it, I haven't run this project under newer Node.js versions in a long time.
Hat jemand ähnliche Probleme mit der node-sonos-http-api?
ShogunPanda created this issue in nodejs/node closed Use Keep-Alive by default in global agents and close idle connections in server #43522