Skip to content

Commit 333e663

Browse files
authored
fixed redundant defer in sessionCore.closeOnce (#1817)
1 parent 9f997d7 commit 333e663

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/query/session_core.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ func (core *sessionCore) attach(ctx context.Context) (finalErr error) {
213213
}
214214

215215
core.closeOnce = sync.OnceFunc(func() {
216-
core.SetStatus(StatusClosed)
217216
defer close(core.done)
218217
defer cancelAttach()
218+
core.SetStatus(StatusClosed)
219219
})
220220

221221
if markGoroutineWithLabelNodeIDForAttachStream {

0 commit comments

Comments
 (0)