dolphindb 2.0.957 → 2.0.958

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/browser.js CHANGED
@@ -2323,8 +2323,6 @@ class DDB {
2323
2323
  try {
2324
2324
  assert(this.connected);
2325
2325
  await this.rpc('connect', { skip_connection_check: true });
2326
- if (this.autologin)
2327
- await this.call('login', [this.username, this.password], { urgent: true, skip_connection_check: true });
2328
2326
  if (this.streaming)
2329
2327
  await this.subscribe();
2330
2328
  resolve();
@@ -2506,8 +2504,21 @@ class DDB {
2506
2504
  `${Number(DDB.le_client)}\n`;
2507
2505
  case 'connect':
2508
2506
  if (this.verbose)
2509
- console.log('connect()');
2510
- return 'connect\n';
2507
+ console.log('connect()' +
2508
+ (this.autologin ?
2509
+ '\n' +
2510
+ `login(${this.username.quote()}, ${this.password.quote()})`
2511
+ :
2512
+ ''));
2513
+ return 'connect\n' +
2514
+ // 详见 InterProcessIO.cpp#APISocketConsole::parseScript 中的
2515
+ // Util::startWith "connect"
2516
+ (this.autologin ?
2517
+ 'login\n' +
2518
+ this.username + '\n' +
2519
+ this.password /* encrypted (可选参数) + '\n' + 'false' */
2520
+ :
2521
+ '');
2511
2522
  }
2512
2523
  })());
2513
2524
  websocket.send(concat([