Hi, I refactored code to share cmlist between instances, this significantly increased auth performance, could you implement this snippet into steam-user ?
const PROTOCOL_VERSION = 65580;
const PRIVATE_IP_OBFUSCATION_MASK = 0xbaadf00d;
// create global variable at the start of the file
let cmListResponse
// request cm list only if cmListResponse is undefined
if (!cmListResponse) {
try {
cmListResponse = await this._apiRequest(
'GET',
'ISteamDirectory',
'GetCMListForConnect',
1,
getCmListQueryString,
300
);
} catch (ex) {
this.emit('debug', `GetCMListForConnect error: ${ex.message}`);
if (++this._getCmListAttempts >= 10) {
this.emit('error', ex);
} else {
setTimeout(() => this._doConnection());
}
return;
}
}