Added small fix for reconnect code not working reliably with TLS connections.
Added small fix for reconnect code not working reliably with TLS connections.

wesley1001/MQTT.js,itavy/MQTT.js,authere/MQTT.js,mcanthony/MQTT.js,AdySan/MQTT.js,bqevin/MQTT.js,RangerMauve/MQTT.js,jaambee/MQTT.js,jdiamond/MQTT.js