1
This commit is contained in:
parent
7dd2331f6c
commit
1a8c40f038
@ -99,7 +99,6 @@ func (this *dbPool) SelectOne(
|
||||
func (this *dbPool) OrmSelectOne(
|
||||
dataSource string,
|
||||
tblName string,
|
||||
fields []string,
|
||||
whereKv [][]string,
|
||||
cb QueryOneCb) {
|
||||
params := []string{}
|
||||
@ -193,14 +192,15 @@ func (this *dbPool) borrowConn(name string) *dataSource {
|
||||
for tryCount < 5 {
|
||||
{
|
||||
this.lock.Lock()
|
||||
defer this.lock.Unlock()
|
||||
if head, ok := this.dataSourceHash[name]; ok {
|
||||
if !head.Empty() {
|
||||
next := head.Next()
|
||||
next.Del()
|
||||
this.lock.Unlock()
|
||||
return next.GetData().(*dataSource)
|
||||
}
|
||||
}
|
||||
this.lock.Unlock()
|
||||
}
|
||||
time.Sleep(time.Second * 1)
|
||||
tryCount++
|
||||
|
Loading…
x
Reference in New Issue
Block a user