Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Attempt to reconnect silently #186
The plugin should attempt to reconnect silently after being disconnect by Facebook. Typically, when Facebook disconnects the plugin, the plugin is able to reconnect immediately after. I can only assume this is some sort of load balancing, after all this is a mobile platform. It has also been reported that logging out on the Facebook website causes the MQTT stream to be closed as well (#171). I can only assume there are other actions which trigger the MQTT stream to die as well. Pidgin will automatically reconnect the plugin after such a disconnection as of 50bb40c, but the user sees an error. While these issues are trivial and low priority, the plugin could be more streamlined by providing a reconnection mechanism in the background.
We are able to keep track of the previous sequence identifier, which will allow us to pick up where we left off with the MQTT stream. In addition, we can queue the outbound MQTT messages, and ensure they are sent once the connection is reestablished. This should allow for such a reconnection mechanism to be easily implemented.