only reconnect if disconnect was caused by an error