[uWSGI] In python websocket_recv_nb seems to unblock every 60 seconds.

Roberto De Ioris roberto at unbit.it
Thu Apr 23 09:46:02 CEST 2015


> Hi,
> 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?
> Thanks!
>
> _______________________________________________


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
http://unbit.com


More information about the uWSGI mailing list