Skip to content
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

Client closes connection instead of starting tls #167

Closed
quickdudley opened this issue Nov 20, 2018 · 1 comment
Closed

Client closes connection instead of starting tls #167

quickdudley opened this issue Nov 20, 2018 · 1 comment

Comments

@quickdudley
Copy link
Contributor

I've been having trouble getting blather to reliably connect to prosody with tls. Sometimes blather connects successfully; but most of the time it ignores the starttls tag. This is the full conversation between client and server before blather closes the connection:

<stream:stream to='localhost' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'><?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xml:lang='en' from='localhost' id='edf4035a-6a36-44d1-b94a-9cbd31c4e9cd' version='1.0' xmlns='jabber:client'><stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>SCRAM-SHA-1</mechanism></mechanisms><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/><auth xmlns='http://jabber.org/features/iq-auth'/></stream:features></stream:stream></stream:stream>

Once one connection has exhibited this behaviour: no future connection from the same ruby process will proceed correctly. I'm able to connect successfully by restarting the ruby process about 5% of the time; and seem to have a slightly higher success rate if I have recently rebooted my operating system.

@quickdudley
Copy link
Contributor Author

Issue seems to go away when I increase the timeout passed to Blather::DSL#setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant