Skip to content

Commit

Permalink
close chan
Browse files Browse the repository at this point in the history
  • Loading branch information
asmyasnikov committed Jan 28, 2025
1 parent 8265bb2 commit c7db1f1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/query/session_core.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,13 @@ func (core *sessionCore) IsAlive() bool {
}

func (core *sessionCore) Close(ctx context.Context) (err error) {
select {
case <-core.done:
return nil
default:
close(core.done)
}

return core.closeOnce(ctx)
}

Expand Down

0 comments on commit c7db1f1

Please sign in to comment.