Skip to content

LazyConnect MySQL Datasources Never Connect after update to v3.21.0 #1592

@thirteen-eleven

Description

@thirteen-eleven

Description/Steps to reproduce

  1. Specify "lazyConnect": true in datasources.json for the given datasource.
  2. Programmatically connect to this datasource after boot using:
    app.datasources.MyDatasource.connector.connect(function(){ console.log("Connected to MyDatasource."); });
  3. After connecting seems to succeed, inspect the datasource's connector.dataSource.connected field and you will see that it is false.
  4. Any attempts to execute native SQL against mysql will wait indefinitely.

Workaround

We were able to get this to work after rolling back loopback-datasource-juggler to 3.20.2.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions