Skip to content

Connection.open crashes an app #340

Open
@boris-gribkov

Description

@boris-gribkov

I use localhost to run database. When I call

try{
    connection = await Connection.open(
      Endpoint(
        host: postgresHost,
        database: postgresName,
        username: postgresUser,
        password: postgresPassword,
        port: postgresPort,
      ),
      //settings: const ConnectionSettings(sslMode: SslMode.disable),
    );
} catch (error) {
   print(error)
}

I have an error Severity.error Server does not support SSL, but it was required.. I know, that I need to add settings (commented above), but if don't, it crashes an app in 1.5-2 minutes and I can't even catch the exception.
Unhandled exception: SocketException: Connection reset by peer (OS Error: Connection reset by peer, errno = 54), address = 127.0.0.1, port = 53342
Maybe like there is a bug with a completer, because I had a different error (Future completed twice) before I updated package version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions