Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
chenquan committed Jun 6, 2024
1 parent 9a5573d commit 4c4223c
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions multiple.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,11 @@ func NewMultipleSqlConn(driverName string, conf DBConf, opts ...SqlOption) sqlx.
return
}

for {
select {
case follow := <-sqlOpt.watcher:
if follow.Added {
p2cPickerObj.add(follow.Name, follow.Datasource)
} else {
p2cPickerObj.del(follow.Datasource)
}
for follow := range sqlOpt.watcher {
if follow.Added {
p2cPickerObj.add(follow.Name, follow.Datasource)
} else {
p2cPickerObj.del(follow.Datasource)
}
}
}()
Expand Down

0 comments on commit 4c4223c

Please sign in to comment.