async connect(hostname, user, password) {
		let connector = null, lastError = null;
		for (let i = 0; i < connectors.length; i++) {
			try {
				connector = await connectors[i].connect(hostname, user, password);
				lastError = null;
				break;
			} catch (e) {
				lastError = e;
				if (e instanceof LoginError) {
					// This connector could establish a connection but the firmware refused it
					break;
				}
			}
		}

		if (lastError !== null) {
			throw lastError;
		}
		return connector;
	}
// If no connector can be found, an error will be thrown.
If no connector can be found, an error will be thrown.
If no connector can be found an error will be thrown .
async connect(hostname, user, password) {
		let connector = null, lastError = null;
		for (let i = 0; i < connectors.length; i++) {
			try {
				connector = await connectors[i].connect(hostname, user, password);
				lastError = null;
				break;
			} catch (e) {
				lastError = e;
				if (e instanceof LoginError) {
					break;
				}
			}
		}
		if (lastError !== null) {
			throw lastError;
		}
		return connector;
	}
async connect ( hostname , user , password ) { let connector = null , lastError = null ; for ( let i = 0 ; i < connectors . length ; i ++ ) { try { connector = await connectors [ i ] . connect ( hostname , user , password ) ; lastError = null ; break ; } catch ( e ) { lastError = e ; if ( e instanceof LoginError ) { break ; } } } if ( lastError !== null ) { throw lastError ; } return connector ; }
If no connector can be found, an error will be thrown.
If no connector can be found an error will be thrown .
// This connector could establish a connection but the firmware refused it