Fix session memory leak
This commit is contained in:
parent
0289bddde8
commit
046d8475cb
6 changed files with 62 additions and 32 deletions
|
@ -11,12 +11,12 @@ const debug = debugname('hostr-api');
|
|||
const router = new Router();
|
||||
|
||||
let statsdOpts = {prefix: 'hostr-api', host: process.env.STATSD_HOST || 'localhost'};
|
||||
router.use(stats(statsdOpts));
|
||||
let statsd = new StatsD(statsdOpts);
|
||||
router.use(function*(next) {
|
||||
this.statsd = statsd;
|
||||
yield next;
|
||||
});
|
||||
router.use(stats(statsdOpts));
|
||||
|
||||
router.use(cors({
|
||||
origin: '*',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue