Skip to content

Commit 788107e

Browse files
author
Divjot Arora
committed
Default to context.Background in cursor.Close
GODRIVER-578 Change-Id: Iaa45873ff5eeb896502e5657ce314124da5ec6e5
1 parent fe44874 commit 788107e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/topology/cursor.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ func (c *cursor) Err() error {
147147
}
148148

149149
func (c *cursor) Close(ctx context.Context) error {
150+
if ctx == nil {
151+
ctx = context.Background()
152+
}
153+
150154
defer c.closeImplicitSession()
151155
conn, err := c.server.Connection(ctx)
152156
if err != nil {

0 commit comments

Comments
 (0)