Community
Participate
Working Groups
The socket connections _sockpairR and _sockpairW do not appear to be closed on disconnect (or ever except for reinitialize()). This caused an issue where the list of valid socket descriptors built up until the outgoing communication socket could not be established to send or receive messages. This became an issue when rapidly attempting to connect and disconnect from the same broker repeatedly. The issue was resolved by explicitly calling client._sockpairR.close() and client._sockpairW.close() within the on_disconnect callback. After doing this, the file descriptors were properly disposed of and connections would no longer become blocked after ~1024 connections. Additional notes: The Linux distribution was cedar-14 Ubuntu running on Heroku (1 dyno). Python version is 2.7.11. Order of execution: connect loop start subscribe publish receive response unsubscribe loop stop disconnect (on disconnect) close sockpair. Let me know if there is any additional information i can supply.