Fix for issue #8.
This problem is caused because twin_topic attribute is created after connection is made. And since twin_topic attribute is accessed on on_connect member function, this causes #8 issue. If for some reason connection speed is slow, twin_topic attribute is created after connection can be made so there would be no error.
To fix this issue self.twin_topic has been moved above the mqtt connection line.
Fix for issue #8. This problem is caused because twin_topic attribute is created after connection is made. And since twin_topic attribute is accessed on on_connect member function, this causes #8 issue. If for some reason connection speed is slow, twin_topic attribute is created after connection can be made so there would be no error. To fix this issue self.twin_topic has been moved above the mqtt connection line.