| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7e663d3 commit 8ffb24b
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -501,7 +501,7 @@ inline void Nghttp2Session::SendPendingData() { | |||
| 501 | 501 | while ((srcLength = nghttp2_session_mem_send(session_, &src)) > 0) { | |
| 502 | 502 | if (req == nullptr) { | |
| 503 | 503 | req = AllocateSend(); | |
| 504 | - destRemaining = req->self_size(); | ||
| 504 | + destRemaining = req->ExtraSize(); | ||
| 505 | 505 | dest = req->Extra(); | |
| 506 | 506 | } | |
| 507 | 507 | DEBUG_HTTP2("Nghttp2Session %s: nghttp2 has %d bytes to send\n", | |
@@ -523,7 +523,7 @@ inline void Nghttp2Session::SendPendingData() { | |||
| 523 | 523 | srcRemaining -= destRemaining; | |
| 524 | 524 | srcOffset += destRemaining; | |
| 525 | 525 | req = AllocateSend(); | |
| 526 | - destRemaining = req->self_size(); | ||
| 526 | + destRemaining = req->ExtraSize(); | ||
| 527 | 527 | dest = req->Extra(); | |
| 528 | 528 | } | |
| 529 | 529 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -167,6 +167,10 @@ char* WriteWrap::Extra(size_t offset) { | |||
| 167 | 167 | offset; | |
| 168 | 168 | } | |
| 169 | 169 | ||
| 170 | + size_t WriteWrap::ExtraSize() const { | ||
| 171 | + return storage_size_ - ROUND_UP(sizeof(*this), kAlignSize); | ||
| 172 | + } | ||
| 173 | + | ||
| 170 | 174 | } // namespace node | |
| 171 | 175 | ||
| 172 | 176 | #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -77,6 +77,7 @@ class WriteWrap: public ReqWrap<uv_write_t>, | |||
| 77 | 77 | size_t extra = 0); | |
| 78 | 78 | inline void Dispose(); | |
| 79 | 79 | inline char* Extra(size_t offset = 0); | |
| 80 | + inline size_t ExtraSize() const; | ||
| 80 | 81 | ||
| 81 | 82 | inline StreamBase* wrap() const { return wrap_; } | |
| 82 | 83 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments