releaseConnection method

Future<void> releaseConnection(
  1. LdapConnection c, {
  2. bool repairBadConnection = false,
})

Release a connection back to the pool If repairBadConnection is true, try to repair the connection by closing/opening

Implementation

Future<void> releaseConnection(LdapConnection c,
    {bool repairBadConnection = false}) async {
  c.connectionInfo.inUse = false;
  if (repairBadConnection) {
    try {
      await c.close();
      await _open(c);
    } catch (e) {
      loggerPool.severe('Could not repair $c');
    }
  }
}