Skip to content

Commit 50c091a

Browse files
benjirewisBenjamin Rewis
authored andcommitted
GODRIVER-2080 Document that StartSession does not error on disconnected client (#709)
1 parent ec0cc6f commit 50c091a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mongo/client.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ func (c *Client) Ping(ctx context.Context, rp *readpref.ReadPref) error {
271271

272272
// StartSession starts a new session configured with the given options.
273273
//
274+
// StartSession does not actually communicate with the server and will not error if the client is
275+
// disconnected.
276+
//
274277
// If the DefaultReadConcern, DefaultWriteConcern, or DefaultReadPreference options are not set, the client's read
275278
// concern, write concern, or read preference will be used, respectively.
276279
func (c *Client) StartSession(opts ...*options.SessionOptions) (Session, error) {

0 commit comments

Comments
 (0)