I ran into a problem with where pool.New panics if size is 0. This change makes it so an empty pool isn't pinged. This seem like the right behavior (since, if I'm reading the code right, it would make a connection just to ping it).
And, yes, it's silly to make an empty pool. I didn't realize I was, until I started getting "divide by zero" errors this morning. But, it "works", it just doesn't re-use connections.
I ran into a problem with where
pool.New
panics ifsize
is 0. This change makes it so an empty pool isn't pinged. This seem like the right behavior (since, if I'm reading the code right, it would make a connection just to ping it).And, yes, it's silly to make an empty pool. I didn't realize I was, until I started getting "divide by zero" errors this morning. But, it "works", it just doesn't re-use connections.