Skip to content

NullReferenceException after updating from v1.1.1 to 1.2.0 #1009

@niemyjski

Description

@niemyjski

So I tracked this down to TransportRequestState.cs... If you don't enable metrics (which we are not). Then you will get null refs all over this class....

public void Dispose()
{
if (!_traceEnabled || this._result == null)
return;

        if (_result.Success)
        {
            Trace.TraceInformation("NEST {0} {1} ({2}):\r\n{3}"
                , _result.RequestMethod
                , _result.RequestUrl
                , _stopwatch.Elapsed <---- NULL REF
                , _result
            );
        }
        else
        {
            Trace.TraceError(
                "NEST {0} {1} ({2}):\r\n{3}"
                , _result.RequestMethod
                , _result.RequestUrl
                , _stopwatch.Elapsed.ToString() <---- NULL REF
                , _result.ToString()
            );
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions