From 03df640b48e253e04c141d7b331b4362eef7b415 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 10 May 2024 11:57:42 +0800 Subject: [PATCH] 1 --- dbpool.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbpool.go b/dbpool.go index aa1ecc8..66a2d17 100644 --- a/dbpool.go +++ b/dbpool.go @@ -424,10 +424,10 @@ func (this *dbPool) internalQueryEx(dataSource string, sql string, params []stri } } - if this.style == GO_STYLE_DB { + if this.style == GO_STYLE_DB || noMainThread { defer freeFunc() cb(err, dataSet) - } else if !noMainThread { + } else { _app.RegisterMainThreadCb( func() { defer freeFunc()