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()