Re: Need to set socket options, for no breaking after a timeout

2017-05-12 Thread Andrew Godwin
Hi Victor, Socket handling for the TCP sockets is done by Twisted inside its TCP core, so you would have to look there to see what sort of options they set when opening a HTTP/WS connection handler. I personally have not seen too many issues with WebSocket timeouts, presumably as Daphne implements

Need to set socket options, for no breaking after a timeout

2017-05-12 Thread Victor Porton
About https://github.com/django/channels In the past I dealt with another Python WebSocket engine (unrelated to Django). The connection was breaking after a timeout. I solved this problem adding: sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) sock.setsockopt(socket.SOL_TCP, socket.