isOpen property

bool isOpen

Whether this connection is currently open.

A Connection is open until it's closed (either by an explicit Connection.close call or due to an unrecoverable error from the server). Other sessions, such as transactions or connections borrowed from a pool, may have a shorter lifetime.

The closed future can be awaited to get notified when this session is closing.

Implementation

bool get isOpen;