Skip to content

Commit

Permalink
http2: pass session to DEBUG_HTTP2SESSION2
Browse files Browse the repository at this point in the history
When configure with --debug-http2 --debug-nghttp2 the following
compilation error is generated:

DEBUG_HTTP2SESSION2(this, "fatal error receiving data: %d", ret);
                          ^
../src/node_http2.cc:1690:27:
error: invalid use of 'this' outside of a non-static member function

1 errors generated.

OnStreamReadImpl is static and I think the intention was to pass in the
session variable here.

PR-URL: #20815
Refs: #20806
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
  • Loading branch information
danbev authored and rvagg committed Aug 16, 2018
1 parent 52f5829 commit 955080f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_http2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,7 @@ void Http2Session::OnStreamReadImpl(ssize_t nread,
// ssize_t to int. Cast here so that the < 0 check actually works on
// Windows.
if (static_cast<int>(ret) < 0) {
DEBUG_HTTP2SESSION2(this, "fatal error receiving data: %d", ret);
DEBUG_HTTP2SESSION2(session, "fatal error receiving data: %d", ret);

Local<Value> argv[1] = {
Integer::New(isolate, ret),
Expand Down

0 comments on commit 955080f

Please sign in to comment.