Skip to content
Closed
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
4 changes: 3 additions & 1 deletion elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ type BaseClient struct {
compatibilityHeader bool

disableMetaHeader bool
productCheckMu sync.RWMutex
productCheckMu *sync.RWMutex
productCheckSuccess bool
}

Expand Down Expand Up @@ -190,6 +190,7 @@ func NewClient(cfg Config) (*Client, error) {
disableMetaHeader: cfg.DisableMetaHeader,
metaHeader: initMetaHeader(tp),
compatibilityHeader: cfg.EnableCompatibilityMode || compatibilityHeader,
productCheckMu: new(sync.RWMutex),
},
}
client.API = esapi.New(client)
Expand Down Expand Up @@ -223,6 +224,7 @@ func NewTypedClient(cfg Config) (*TypedClient, error) {
disableMetaHeader: cfg.DisableMetaHeader,
metaHeader: metaHeader,
compatibilityHeader: cfg.EnableCompatibilityMode || compatibilityHeader,
productCheckMu: new(sync.RWMutex),
},
}
client.API = typedapi.New(client)
Expand Down