[zeromq-dev] Memory leak help
Michel Pelletier
pelletier.michel at gmail.com
Mon Apr 23 08:08:16 CEST 2012
One dirt simple approach is to occasionally send a heartbeat down the
pub socket. I presume then the ws.send() work raise an error or
something and the worker would die or you could detect the closed
websocket some other way.
There is an outstanding branch that would add zmq_poll compatibility
to zmq.green. I think the poller with a timeout might work well for
you in this situation.
-Michel
On Sun, Apr 22, 2012 at 10:06 PM, Gregory Taylor <gtaylor at gc-taylor.com> wrote:
> It looks like I'm getting stuck in this loop:
>
> https://github.com/dliverman/eve-market-ping-map/blob/master/ws_server.py#L163
>
> When the use closes the page, the subscriber socket never closes. Each
> greenlet gets stuck in the infinite loop.
>
> It seems like I need a way to poll with each loop iteration, but not
> block. like this is currently doing:
>
> system_id = subscriber.recv()
>
> Any ideas?
>
> Greg
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
More information about the zeromq-dev
mailing list