added handleConnectorApiClosed

this is handled when the server closes the connection but doesn't give
a message for this
separated api:error from an close without a message
update