Re: Invalid state. Not connected (General questions)
Let's not jump to conclusions here, ok? :)
Can you do some basic tests? Set blocking=true and don't change it back to false no more at all.
Try to connect. Does that work? Now start adding line by line until it stops working - and then let me know where and why and how it doesn't work. Can you do that?