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 + } } }