handleError() loops if already connected

handleError doesn't check for "already connected" error causing loop