Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/kubehound/storage/storedb/mongo_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ func createClient(ctx context.Context, opts *options.ClientOptions, timeout time
// createReaderWriter creates a pair of MongoDB clients - one for writes and another for reads.
func createReaderWriter(ctx context.Context, url string, timeout time.Duration) (*mongo.Client, *mongo.Client, error) {
baseOpts := options.Client()
baseOpts.ApplyURI(url + fmt.Sprintf("/?connectTimeoutMS=%d", timeout))
baseOpts.ApplyURI(url)
baseOpts.SetConnectTimeout(timeout)

writer, err := createClient(ctx, baseOpts, timeout)
if err != nil {
Expand Down
Loading