|
@@ -144,7 +144,7 @@ func (m *MongodbSim) InitPool() {
|
|
|
opts := options.Client()
|
|
|
opts.SetConnectTimeout(3 * time.Second)
|
|
|
opts.ApplyURI("mongodb://" + m.MongodbAddr)
|
|
|
- opts.SetMaxPoolSize(uint64(m.Size))
|
|
|
+ opts.SetMaxPoolSize(uint16(m.Size))
|
|
|
m.pool = make(chan bool, m.Size)
|
|
|
opts.SetMaxConnIdleTime(2 * time.Hour)
|
|
|
m.Ctx, _ = context.WithTimeout(context.Background(), 99999*time.Hour)
|