Skip to content

Commit

Permalink
fix cache store bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Jone.Xie committed Nov 25, 2015
1 parent 9a7d5a9 commit 63b25b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ocsp/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ Cache.prototype.probe = function probe(id, callback) {
Cache.prototype.store = function store(id, response, maxTime, callback) {
if (this.cache.hasOwnProperty(id))
clearTimeout(this.cache[id].timer);
var self = this;
this.cache[id] = {
response: response,
timer: setTimeout(function() {
delete this.cache[id];
delete self.cache[id];
}, maxTime)
};

Expand Down

0 comments on commit 63b25b4

Please sign in to comment.