Skip to content

Commit 54669b4

Browse files
committed
fixed test
1 parent b1ca5be commit 54669b4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

internal/table/session.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,9 +496,11 @@ func (s *Session) Close(ctx context.Context) (finalErr error) {
496496
s.SetStatus(table.SessionClosed)
497497
}()
498498

499-
err := s.closeOnce(ctx)
500-
if err != nil {
501-
return xerrors.WithStackTrace(err)
499+
if s.closeOnce != nil {
500+
err := s.closeOnce(ctx)
501+
if err != nil {
502+
return xerrors.WithStackTrace(err)
503+
}
502504
}
503505

504506
return nil

0 commit comments

Comments
 (0)