From 880eebcc9bfbae42c1e31cd2861fc4691145fdcc Mon Sep 17 00:00:00 2001 From: prasad83 Date: Mon, 22 Sep 2025 12:59:01 +0530 Subject: [PATCH] Fix: consumeCommands - return if conn is closed. When client connection is closed stop reading query further. --- command.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/command.go b/command.go index 14f0029..a137f94 100644 --- a/command.go +++ b/command.go @@ -69,6 +69,11 @@ func (srv *Server) consumeCommands(ctx context.Context, conn SQLConnection) (err if err != nil { return err } + + // NOTE(Prasad): If conn is closed after handleCommand return. + if t == types.ClientClose || t == types.ClientTerminate { + return nil + } } }