make -disconnect clear the "connected" flag
After you get one stream error on connection, give up (don't retry every message using the bad connection)