[django-channels client wrapper] specifying no reconnection attempts

23 views
Skip to first unread message

bit bouncer

unread,
Jul 14, 2018, 8:31:50 AM7/14/18
to Django users
Basically, I don't want the websocket to automatically attempt reconnections after it has been closed by the server.

I've tried
new WebSocketBridge({maxReconnectAttempts: 1})

and 
const socket = new WebSocketBridge({maxReconnectAttempts: 1})

socket
.connect('/ws/', undefined, {maxReconnectAttempts: 1})

but to no avail. 

Am I doing something wrong? Any help would be appreciated.

Andrew Godwin

unread,
Jul 15, 2018, 3:00:23 AM7/15/18
to django...@googlegroups.com
I don't know much about that JavaScript code, I'm afraid, otherwise I would try and help (it's likely we're going to deprecate support for it soon as there's no maintainer for it right now anyway).

Take a look through the source code and see if there's something you can call to stop reconnection attempts when you get a good close event, maybe?

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...@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/e4471747-3133-49b7-b98d-cf7ecb64c1db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages