jrief / django-websocket-redis

Websockets for Django applications using Redis as message queue
http://django-websocket-redis.awesto.com/
MIT License
894 stars 221 forks source link

Use websocket-client to create a connection, why the runserver way to start the Django will automatically restart #210

Open liwenbin1991 opened 7 years ago

liwenbin1991 commented 7 years ago

Hi, I use python2.7 manage.py runserver 0.0.0.0:8234 to start examples, and then use websocket-client to create a connection:

from websocket import create_connection
def test_pubsub_broadcast():
    websocket_url = 'ws://192.168.2.214:8234/ws/foobar?subscribe-broadcast&publish-broadcast&echo'
    ws = create_connection(websocket_url)

Connection can be created successfully, but runserver will immediately restart, if you continue to use this connection to send data will be reported to the wrong:

Connection is already close

django=1.8.14 django-websocket-redis=0.4.7 websocket-client=0.37.0