-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
NEST/Elasticsearch.Net version:
- NEST v7.8.0
- Elasticsearch.Net v7.8.0
Elasticsearch version:
N/A
Description of the problem including expected versus actual behavior:
Disposing of a Nest.ConnectionSettings
object that has not been used throws a NullReferenceException
.
Steps to reproduce:
Simply run this code in a .NET Core project (didn't seem to happen with a .NET Framework project):
using (var settings = new ConnectionSettings())
{
}
System.NullReferenceException: 'Object reference not set to an instance of an object.'
at Elasticsearch.Net.RequestDataHttpClientFactory.StopCleanupTimer()
at Elasticsearch.Net.RequestDataHttpClientFactory.CleanupTimer_Tick()
at Elasticsearch.Net.RequestDataHttpClientFactory.Dispose()
at Elasticsearch.Net.HttpConnection.DisposeManagedResources()
at Elasticsearch.Net.HttpConnection.System.IDisposable.Dispose()
at Elasticsearch.Net.ConnectionConfiguration`1.DisposeManagedResources()
at Elasticsearch.Net.ConnectionConfiguration`1.System.IDisposable.Dispose()
Expected behavior
An exception is not thrown.
Provide ConnectionSettings
(if relevant):
N/A
Provide DebugInformation
(if relevant):
N/A
jdaltonchilders
Metadata
Metadata
Assignees
Labels
No labels