Closed jaruba closed 9 years ago
The agent most likely already reserved port 1900 which is needed for listening for ssdp broadcasts. Therefor the sspd-client socket creation will fail because node-ssdp creates its sockets without flag SO_REUSEADDR. You could change to following code in the lib/index.js:
SSDP.prototype._createSocket = function () { return dgram.createSocket('udp4') }
to
SSDP.prototype._createSocket = function () { return dgram.createSocket('udp4', reuseAddr: true) }
for testing if this solves your issue.
@ChrisScheffler has a valid point. If the proposed change fixes your issue I can release a new version that has exposes an option to set reuseAddr
to true
.
@ChrisScheffler @diversario
Seems like a fair solution, I was expecting it to be some sort of port related problem, I just haven't been anywhere near a Samsung TV with DLNA support in this time, I should be able to test it tonight and will report if it fixes it as soon as possible. :)
I've tested this many times and was unable to reproduce the issue, I believe it may have been caused by the fact that Samsung Allshare also creates a UPNP/DLNA Server of it's own.
If I see this problem appear again I will reopen the ticket but for now, it's working fine when the AllShare Agent is active.
I'm using
node-ssdp
to check forMediaRenderer
with:This works great in all cases except when I have Samsung AllShare Agent opened, it seems it creates some conflict as when it is open
client.on('response')
is never triggered.I checked the console log, there are no JS errors of any kind. Any thoughts on why this scenario could be an issue for
node-ssdp
? (I know Samsung AllShare also uses upnp/dlna to share folders and stream to the TV)