[uWSGI] In python websocket_recv_nb seems to unblock every 60 seconds.
timlee246 at yahoo.com
Thu Apr 23 19:38:29 CEST 2015
I'm actually not using a browser, but a python script to connect, but I guess it doesn't matter what client I'm using. So can I change to a larger interval length for the ping packet to send? Or is it hard set to 60 seconds?
On Thursday, April 23, 2015 12:46 AM, Roberto De Ioris <roberto at unbit.it> wrote:
> I’m doing something similar to the Python uWsgi demo, Bombertab.I have the
> line ’ready = gevent.select.select([websocket_fd, redis_fd], , ,
> 300.0)’in a while loop in the websocket session greenlet. I have the
> timeout parameter in the select method set to 300 seconds, but it seems
> that ‘uwsgi.websocket_recv_nb’ unblocks every 60 seconds. Am I doing
> something wrong or is this expected? How can I get
> ‘uwsgi.websocket_recv_nb’ to unblock after every 300 seconds not 60?
hi, waking up happens because the browser is sending a ping packet.
The websocket api automatically manages it but the socket event is
obviously registered. Just check for the return value, if it is empty just
wait again for the event.
Roberto De Ioris
uWSGI mailing list
uWSGI at lists.unbit.it
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the uWSGI