2
0

Add error to *ConnectionPool.Acquire return

This commit is contained in:
Jack Christensen
2013-07-25 07:52:05 -05:00
parent 209a9dfaf5
commit 622ff142ca
3 changed files with 50 additions and 20 deletions
+4 -1
View File
@@ -610,7 +610,10 @@ func BenchmarkConnectionPool(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
conn := pool.Acquire()
var conn *pgx.Connection
if conn, err = pool.Acquire(); err != nil {
b.Fatalf("Unable to acquire connection: %v", err)
}
pool.Release(conn)
}