[zeromq-dev] pyzmq pubsub: Address already in use
Douglas Petican
dpetican at gmail.com
Sun Jun 12 03:26:00 CEST 2016
This is what I am currently using in my req-rep application. Its
generalized so that a number of different processes can use the same code:
http://pastebin.com/HSYqsxRn
If I am exiting normally I just call clean_up with an exit level of 0
and no error message
<-Douglas Petican->
On 2016-06-11 7:14 PM, Mazzaroth M. wrote:
> I'm making a pyzmq app which uses the publisher-subscribe pattern and
> when I setup a zeromq device in a controller class, I'm not able to
> cleanup the port and on next run I get the `Address already in use`
> error on startup(and I will need to reboot to release the port).
>
> I believe that I'm not able to cleanup the device when I quit the
> controller. It may be quite simple:
> https://bitbucket.org/sidha/twitpub/commits/c9d047f5eca4d03fe30f8d844bd367c0894fa47d#chg-twitpub/controller.py
>
> How do I cleanup the Device object on a keyboard interrupt? I initiate
> the app from a run script:
> https://bitbucket.org/sidha/twitpub/src/c9d047f5eca4d03fe30f8d844bd367c0894fa47d/twitpub/run?fileviewer=file-view-default
>
> I was thinking of overriding __del__ but it never gets called on ctrl-c
>
> regards,
> Michael
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160611/d2c18d9d/attachment.htm>
More information about the zeromq-dev
mailing list