Skip to content

Commit 7a406f9

Browse files
authored
Merge pull request #114 from alesstimec/fix-new-proxies-session
NewProxiedSession - ping to assign a socket to the returned session.
2 parents 692d58e + e006254 commit 7a406f9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mgo.go

+2
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,8 @@ func NewProxiedSession(c *gc.C) *ProxiedSession {
844844
mgoInfo.Addrs = []string{proxy.Addr()}
845845
session, err := mgo.DialWithInfo(mgoInfo)
846846
c.Assert(err, gc.IsNil)
847+
err = session.Ping()
848+
c.Assert(err, jc.ErrorIsNil)
847849
return &ProxiedSession{
848850
Session: session,
849851
TCPProxy: proxy,

0 commit comments

Comments
 (0)