(connection Connection)
| 218 | } |
| 219 | |
| 220 | func (pool *Pool) putConnectionUnsafe(connection Connection) { |
| 221 | if len(pool.synchro.idleConnections) == cap(pool.synchro.idleConnections) { |
| 222 | pool.synchro.stats.TotalCount-- |
| 223 | _ = connection.conn.Close() // Could it be more effective to close older connections? |
| 224 | } else { |
| 225 | pool.synchro.idleConnections = append(pool.synchro.idleConnections, connection) |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | func (pool *Pool) newConnectionProducer() { |
| 230 | var connection Connection |
no test coverage detected