You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Functionality-wise, there's no reason to return ErrBadConn from Open()
since returning *any* error will make sure that the connection is not
put into the pool. But there's a very good reason not to return
ErrBadConn; it makes diagnosing problems during connection establishment
completely impossible without either having access to the server logs or
interpreting captured network traffic.
This is a minor backwards compatibility breakage, since we used to
return ErrBadConn in a lot of cases previously. However, there were
several cases were we returned the real error instead, so any caller
assuming that they would either get a nil or ErrBadConn from Open was
already broken.
Based on initial work from Paul Jolly, after discussions with Paul and
Eric Chlebek.
0 commit comments