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

WebSocket: failed: Data frame received after close #291

Open
ltAldoRaine opened this issue Mar 16, 2018 · 9 comments
Open

WebSocket: failed: Data frame received after close #291

ltAldoRaine opened this issue Mar 16, 2018 · 9 comments

Comments

@ltAldoRaine
Copy link

After sending conn.disconnect() strophe gives such error and than trying to connect again. second attempt completes successfully, but there is 2 active same ws connection.
capture2
capture1

@jcbrand
Copy link
Contributor

jcbrand commented Mar 16, 2018

Try calling conn.reset() first before trying to reconnect again.

@ltAldoRaine
Copy link
Author

still same....

@ltAldoRaine
Copy link
Author

why conn.connect method doesn't close old ws connection... i think that's the main problem

@ltAldoRaine
Copy link
Author

is there any solutions ?

@jcbrand
Copy link
Contributor

jcbrand commented Mar 23, 2018

I don't know. Are you reusing the Strophe.Connection object or creating a new one?

@ltAldoRaine
Copy link
Author

creating new one. .

@jcbrand
Copy link
Contributor

jcbrand commented Mar 23, 2018

That's probably your problem. You should call reset() on the existing connection and reuse it.

@ltAldoRaine
Copy link
Author

ltAldoRaine commented Mar 26, 2018

` if (!conn.connection) {
conn.connection = new Strophe.Connection('ws://' +host + ':5280/ws', {'mechanisms': [Strophe.SASLPlain]});
}

i tried that but ended with same result.. actually connect method initialize new websocket connection. also i tested it in edge and error hasn't occured on disconnect and there is only one active ws connection

@zh99998
Copy link

zh99998 commented May 8, 2018

same problem here.
it's quiet easy to reproduce using candy-chat

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

3 participants