Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pool.Get doesn't return an err #26

Closed
nstott opened this issue May 22, 2013 · 1 comment
Closed

pool.Get doesn't return an err #26

nstott opened this issue May 22, 2013 · 1 comment

Comments

@nstott
Copy link

nstott commented May 22, 2013

The documentation seems to indicate that pool.Get will return an err,
// conn, err := pool.Get()
// defer conn.Close()
// // do something with the connection
but it doesn't seem to be doing that.. what's the best way to catch dial errors on pooled connections?

@garyburd
Copy link
Member

The underlying connection is dialed on the first method call to the pool connection. Call c.Err() to force a dial and get the error.

@garyburd garyburd closed this as completed Jun 9, 2013
@gomodule gomodule locked and limited conversation to collaborators Dec 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants