Channels : disconnect alone

46 views
Skip to first unread message

Okok kokok

unread,
Jun 6, 2017, 2:00:47 PM6/6/17
to django...@googlegroups.com

Hello,

I dont't understand why websocket disconnect alone...
I run with these commands :

  • daphne -e ssl::privateKey=<path to .key>:certKey=<path to .cer> .asgi:channel_layer -p -b 0.0.0.0

  • python3.5 manage.py runworker

I have this :
127.0.0.1:50398 - - [22/May/2017:11:30:01] "WSCONNECTING /" - -
127.0.0.1:50398 - - [22/May/2017:11:30:01] "WSCONNECT /" - -
127.0.0.1:50398 - - [22/May/2017:11:30:51] "WSDISCONNECT /" -

It disconnect approximately 30 seconds after connection.
I want that all connection persists.

Thank you

Andrew Godwin

unread,
Jun 6, 2017, 7:57:19 PM6/6/17
to django...@googlegroups.com
Are you accepting the connection in a consumer on `websocket.connect`? Is there some proxy in the way that's dropping WebSocket packets, meaning the ping times out and Daphne closes it?

There's a lot of reasons why a websocket can close after a timeout, and most of them are related to your setup and network rather than Channels.

Andrew

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMdJP%2Bj-hWTrazMCojRNL%3D_T7SrgFvL-iMaRRryqHWgy5cyLuQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages