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

Fix total byteSize tracking in connection #10

Merged
merged 2 commits into from Aug 15, 2014
Merged

Conversation

@kpdecker
Copy link
Contributor

kpdecker commented Aug 15, 2014

Previously no tracking was done so the cache size was effectively infinite.

This fixes #7

Previously no tracking was done so the cache size was effectively infinite.

This fixes #7
@geek geek added the bug label Aug 15, 2014
@geek geek added this to the 1.0.5 milestone Aug 15, 2014
@geek geek self-assigned this Aug 15, 2014
@@ -165,6 +165,8 @@ internals.Connection.prototype.set = function (key, value, ttl, callback) {
envelope.timeoutId = timeoutId;

segment[key.id] = envelope;
self.byteSize += envelope.byteSize;

This comment has been minimized.

Copy link
@geek

geek Aug 15, 2014

Member

can just be this.byteSize

generally only use self when its necessary

geek added a commit that referenced this pull request Aug 15, 2014
Fix total byteSize tracking in connection
@geek geek merged commit 867b6ae into hapijs:master Aug 15, 2014
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.