-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Using a url string with connect() parses full host instead of hostname #189
Comments
Yes it is, thanks! Remember to add a unit test for it! |
Any updates on this? I'd love to have it in 0.3.9. |
@mcollina The patch is easy, but I'm having trouble figuring out how to put a useful test in. Mocha doesn't have spies so I can't easily make sure the right things are being passed to createClient and I can't find anywhere that the host is exposed after |
Got it, add sinon as a devDepenency and you are done :). |
Any update on this? |
Ahhh, so sorry, I will get this in within the next couple hours. Rough weekend personally. |
I am calling connect() with a URL like so:
tcp://username:password@mqtt.redacted.com:1883?clientId=1150293638929
, which is, subsequently, callingcreateClient('1883', 'mqtt.redacted.com:1883', opts)
. I am thinking this should, instead, becreateClient('1883', 'mqtt.redacted.com', opts)
?I am happy to open a PR fixing this, but I'm not sure which is the desired behavior. My case seems to require the second one, which currently doesn't work without a patch.
The text was updated successfully, but these errors were encountered: