Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullReferenceException after updating from v1.1.1 to 1.2.0 #1009

Closed
niemyjski opened this issue Oct 22, 2014 · 2 comments
Closed

NullReferenceException after updating from v1.1.1 to 1.2.0 #1009

niemyjski opened this issue Oct 22, 2014 · 2 comments

Comments

@niemyjski
Copy link
Contributor

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()
            );
        }
    }
@gmarz gmarz closed this as completed in 9e14242 Oct 22, 2014
@gmarz
Copy link
Contributor

gmarz commented Oct 22, 2014

@niemyjski Huge thank you for finding this. I just pushed a fix and will be releasing a new version shortly.

@niemyjski
Copy link
Contributor Author

No problem :)

@gmarz gmarz added Bug labels Oct 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants