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 <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
  • Loading branch information
danbev authored and MylesBorins committed May 22, 2018
1 parent 0829b54 commit f7d96ac
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 @@ -1687,7 +1687,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 f7d96ac

Please sign in to comment.