Skip to content

Commit

Permalink
Merge pull request #30 from IdrisHanafi/hotfix/pool-db-optimization
Browse files Browse the repository at this point in the history
hotfix: prevent pool_db connections from accumulating
  • Loading branch information
arnaubennassar authored Oct 4, 2023
2 parents 47ae596 + 97899ad commit 5399f88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/config-file/node-config-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,9 @@ to be read in order to provide the private keys to sign the L1 txs
| **Additional items** | False |
| **Tuple validation** | See below |

| Each item of this array must be | Description |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------ |
| [PrivateKeys items](#EthTxManager_PrivateKeys_items) | KeystoreFileConfig has all the information needed to load a private key from a k ... |
| Each item of this array must be | Description |
| ---------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [PrivateKeys items](#EthTxManager_PrivateKeys_items) | KeystoreFileConfig has all the information needed to load a private key from a key store file |

#### <a name="autogenerated_heading_2"></a>6.3.1. [EthTxManager.PrivateKeys.PrivateKeys items]

Expand Down
2 changes: 2 additions & 0 deletions pool/pgpoolstorage/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ func (p *PostgresPoolStorage) CheckPolicy(ctx context.Context, policy pool.Polic
} else if err != nil {
return false, err
}

defer rows.Close()
if !rows.Next() { // should always be a row if the policy exists
return false, nil
}
Expand Down

0 comments on commit 5399f88

Please sign in to comment.