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